Skip to content
This repository has been archived by the owner on Jan 17, 2022. It is now read-only.

Commit

Permalink
Fixes in building docker image
Browse files Browse the repository at this point in the history
  • Loading branch information
gkazakov111 committed Apr 14, 2020
1 parent 788378f commit 2ce14ba
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
13 changes: 8 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,22 @@ RUN VERSION="version=$(git describe --tag --always 2> /dev/null)" \
&& BUILDER="builder=$(go version)" \
&& LDFLAGS="-s -w -X '"${BUILDINFO_PACKAGE}$VERSION"' -X '"${BUILDINFO_PACKAGE}$DATETIME"' -X '"${BUILDINFO_PACKAGE}$REPOSITORY"' -X '"${BUILDINFO_PACKAGE}$REVISION"' -X '"${BUILDINFO_PACKAGE}$BUILDER"'" \
&& CGO_ENABLED=0 go build -mod=readonly -a -o /artifacts/${PROJECT} -ldflags="${LDFLAGS}" \
&& echo "Build flags: ${LDFLAGS}"
&& echo "Build flags: ${LDFLAGS}" \
#&& mv /${PROJECT} /${PROJECT}/ \
&& mv attributes.template /attributes.template \
&& mv systemAttributes.template /systemAttributes.template \
&& mv usageTickets.template /usageTickets.template


# Multi-stage build - copy certs and the binary into the image
FROM scratch
FROM alpine
WORKDIR /
COPY --from=0 /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
COPY --from=0 /artifacts/* /
COPY --from=0 /usr/local/bin/kubectl /usr/local/bin/kubectl
COPY --from=0 /start.sh /
COPY --from=0 /root/.kube/config /

CMD [ "/coco-synthetic-image-publication-monitor" ]


ENV AWS_ADDRESS s3.amazonaws.com
ENV BUCKET_ADDRESS com.ft.imagepublish.int
EXPOSE 8080
Expand Down
2 changes: 1 addition & 1 deletion synth-publish.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ func main() {
Timeout: 10 * time.Second,
}
http.HandleFunc("/__health", fthealth.Handler(timedHC))
http.HandleFunc(httphandlers.GTGPath, httphandlers.NewGoodToGoHandler(gtg.StatusChecker(app.GTG)))
http.HandleFunc(httphandlers.BuildInfoPath, httphandlers.BuildInfoHandler)
http.HandleFunc("/history", app.historyHandler)
http.HandleFunc("/forcePublish", app.forcePublish)
err := http.ListenAndServe(":8080", nil)
Expand Down

0 comments on commit 2ce14ba

Please sign in to comment.