attempting to build static binary.

Make sure we "test" binary in final static-debian11 container by running help as part of build.
This commit is contained in:
Jason Kulatunga 2023-11-08 08:31:34 -08:00
parent f9bab38744
commit 97838dfccd
No known key found for this signature in database
1 changed files with 2 additions and 2 deletions

View File

@ -33,7 +33,7 @@ RUN --mount=type=cache,target=/tmp/lock,sharing=locked \
&& go generate ./... \
&& go vet ./... \
&& go test -timeout=20m ./... \
&& go build -o /go/bin/fasten ./backend/cmd/fasten/
&& go build -ldflags "-extldflags=-static" -tags "static" -o /go/bin/fasten ./backend/cmd/fasten/
# create folder structure
RUN mkdir -p /opt/fasten/db \
@ -52,7 +52,7 @@ COPY --from=frontend-build /usr/src/fastenhealth/dist /opt/fasten/web
COPY --from=backend-build /go/bin/fasten /opt/fasten/fasten
COPY LICENSE.md /opt/fasten/LICENSE.md
COPY config.yaml /opt/fasten/config/config.yaml
RUN ["/opt/fasten/fasten", "--help"]
CMD ["/opt/fasten/fasten", "start", "--config", "/opt/fasten/config/config.yaml"]