-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathDockerfile
More file actions
25 lines (21 loc) · 787 Bytes
/
Dockerfile
File metadata and controls
25 lines (21 loc) · 787 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
################################################################################
# build
################################################################################
FROM golang:1.17.6 AS build
COPY . /project
WORKDIR /project
# If we're running goreleaser, then our binary will already be copied into our
# work directory, and we won't see the VERSION file.
RUN set -x \
&& \
if [ -f VERSION ]; then \
make default; \
else \
mkdir -p bin && mv -v * bin/; \
fi
################################################################################
# release
################################################################################
FROM ubuntu:bionic-20220105 AS release
COPY --from=build /project/bin/* /usr/local/bin/
CMD ["/bin/bash"]