aboutsummaryrefslogtreecommitdiff
path: root/Dockerfile
diff options
context:
space:
mode:
authorJacky Zhao <[email protected]>2020-05-09 15:51:43 -0700
committerGitHub <[email protected]>2020-05-09 15:51:43 -0700
commitb88fa4abe6d458394716e278a3ee8e8859a973fb (patch)
treebd9c1f6034787e081b6097a2e24747902b552f3b /Dockerfile
parentAdd get hash endpoint (diff)
parentfix port bug (diff)
downloadctrl-v-b88fa4abe6d458394716e278a3ee8e8859a973fb.tar.xz
ctrl-v-b88fa4abe6d458394716e278a3ee8e8859a973fb.zip
Merge branch 'master' into api
Diffstat (limited to 'Dockerfile')
-rw-r--r--Dockerfile7
1 files changed, 4 insertions, 3 deletions
diff --git a/Dockerfile b/Dockerfile
index 5a14889..b533070 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -7,7 +7,6 @@ COPY . /app/src
WORKDIR /app/src
RUN apk add git ca-certificates
-RUN go mod download
# Build image
RUN CGO_ENABLED=0 GOOS=linux go build -o /go/bin/app
@@ -16,10 +15,12 @@ RUN CGO_ENABLED=0 GOOS=linux go build -o /go/bin/app
FROM scratch
# Copy app
-COPY --from=builder /go/bin/app /go/bin/app
+COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
+COPY --from=builder /go/bin/app ./
+COPY .env ./
# Expose ports, change port to whatever you need to expose
EXPOSE 8080
# Run app
-ENTRYPOINT ["/go/bin/app"] \ No newline at end of file
+ENTRYPOINT ["./app"] \ No newline at end of file