Skip to content

Commit

Permalink
attempting to build static binary.
Browse files Browse the repository at this point in the history
Make sure we "test" binary in final static-debian11 container by running help as part of build.
  • Loading branch information
AnalogJ committed Nov 8, 2023
1 parent f9bab38 commit 97838df
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand All @@ -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"]


Expand Down

0 comments on commit 97838df

Please # to comment.