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:
parent
f9bab38744
commit
97838dfccd
|
@ -33,7 +33,7 @@ RUN --mount=type=cache,target=/tmp/lock,sharing=locked \
|
||||||
&& go generate ./... \
|
&& go generate ./... \
|
||||||
&& go vet ./... \
|
&& go vet ./... \
|
||||||
&& go test -timeout=20m ./... \
|
&& 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
|
# create folder structure
|
||||||
RUN mkdir -p /opt/fasten/db \
|
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 --from=backend-build /go/bin/fasten /opt/fasten/fasten
|
||||||
COPY LICENSE.md /opt/fasten/LICENSE.md
|
COPY LICENSE.md /opt/fasten/LICENSE.md
|
||||||
COPY config.yaml /opt/fasten/config/config.yaml
|
COPY config.yaml /opt/fasten/config/config.yaml
|
||||||
|
RUN ["/opt/fasten/fasten", "--help"]
|
||||||
CMD ["/opt/fasten/fasten", "start", "--config", "/opt/fasten/config/config.yaml"]
|
CMD ["/opt/fasten/fasten", "start", "--config", "/opt/fasten/config/config.yaml"]
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue