Dockerfile examples

From UVOO Tech Wiki
Revision as of 15:33, 12 February 2025 by Busk (talk | contribs) (Created page with "# Examples ## Multistage build - builds using debian runs using apline ``` FROM ubuntu ARG DEBIAN_FRONTEND=noninteractive RUN apt-get update && apt-get install -y golang-go...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Examples

Multistage build - builds using debian runs using apline

FROM ubuntu
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y golang-go
COPY app.go .
RUN CGO_ENABLED=0 go build app.go
FROM alpine
COPY --from=0 /app .
CMD ["./app"]