Skip to content

Commit

Permalink
Merge pull request #671 from blockscout/lymarenkolev/bens/add-dockerfile
Browse files Browse the repository at this point in the history
Fix dockerfile
  • Loading branch information
sevenzing authored Nov 8, 2023
2 parents 70992ae + 5401566 commit 2682d65
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions blockscout-ens/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
FROM lukemathwalker/cargo-chef:0.1.62-rust-1.72-buster as chef
WORKDIR /app
RUN rustup target add x86_64-unknown-linux-musl
RUN apt-get update && apt-get install -y curl wget unzip musl-dev musl-tools
RUN wget https://github.com/protocolbuffers/protobuf/releases/download/v21.12/protoc-21.12-linux-x86_64.zip -O ./protoc.zip \
&& unzip protoc.zip \
&& mv ./include/* /usr/include/ \
Expand All @@ -25,7 +23,11 @@ COPY --from=cache /app/target target
COPY --from=cache $CARGO_HOME $CARGO_HOME
RUN cargo build --release --bin bens-server

FROM debian:bookworm-slim AS runtime
FROM ubuntu:20.04 as run
WORKDIR /app
COPY --from=build /app/target/release/bens-server /usr/local/bin
RUN apt-get update && apt-get install -y libssl1.1 libssl-dev ca-certificates
ENV APP_USER=app
RUN groupadd $APP_USER \
&& useradd -g $APP_USER $APP_USER
COPY --from=build /app/target/release/bens-server /usr/local/bin/bens-server
ENTRYPOINT ["/usr/local/bin/bens-server"]

0 comments on commit 2682d65

Please sign in to comment.