Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minor Dockerfile Improvements #137

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,22 @@ FROM alpine:3.16 as build
WORKDIR /home/chain-bench

RUN apk update && \
apk --no-cache add make go
apk --no-cache --rm add make

COPY . .

ENV CGO_ENABLED=0
RUN make build

FROM alpine:3.16 as product

RUN addgroup -S chainbench && adduser -S chainbench -G chainbench

WORKDIR /home/chain-bench

COPY --from=build /home/chain-bench/chain-bench /usr/local/bin/chain-bench
COPY --from=build /home/chain-bench/templates/*.tpl templates/

USER chainbench

ENTRYPOINT [ "chain-bench" ]