-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile.multi
More file actions
28 lines (20 loc) · 917 Bytes
/
Dockerfile.multi
File metadata and controls
28 lines (20 loc) · 917 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
FROM golang:1.14.0-buster as builder
LABEL maintainer=cfb@liquidreality.org
LABEL description="Example multi-stage build"
ENV DEBIAN_FRONTEND noninteractive
# Add our simple hello_world program
COPY files/hello_world.go /go/hello_world.go
# Build our go binary
RUN cd /go && go build hello_world.go
# Now build our final image
FROM scratch
COPY --from=builder /go/hello_world /hello_world
LABEL \
org.label-schema.schema-version="1.0" \
org.label-schema.vendor="Chet Burgess" \
org.label-schema.name="Docker Examples Multi-stag" \
org.label-schema.version="latest" \
org.label-schema.url="https://github.com/cburgess/docker-examples" \
org.label-schema.vcs-url="https://github.com/cburgess/docker-examples" \
license="Apache-2.0"
CMD ["/hello_world"]