Skip to content

Commit

Permalink
Adapt Dockerfile for development (ethereum#237)
Browse files Browse the repository at this point in the history
* Adapt Dockerfile for development

The Dockerfile for release using Alpine is in the included Dockerfile.release and this one was not used for release so doesn't make sense to have it using multistage nor Alpine.
  • Loading branch information
vcastellm committed Nov 17, 2021
1 parent 322e964 commit 78ba316
Showing 1 changed file with 8 additions and 20 deletions.
28 changes: 8 additions & 20 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,29 +1,17 @@
# Build Geth in a stock Go builder container
FROM golang:1.17-alpine as builder
FROM golang:latest

RUN set -x \
&& buildDeps='bash build-base musl-dev linux-headers git' \
&& apk add --update $buildDeps \
&& rm -rf /var/cache/apk/* \
ARG BOR_DIR=/bor
ENV BOR_DIR=$BOR_DIR

RUN apt-get update -y && apt-get upgrade -y \
&& apt install build-essential git tini -y \
&& mkdir -p /bor

WORKDIR /bor
WORKDIR ${BOR_DIR}
COPY . .
RUN make bor-all

CMD ["/bin/bash"]

# Pull Bor into a second stage deploy alpine container
FROM alpine:3.14

RUN set -x \
&& apk add --update --no-cache \
ca-certificates \
&& rm -rf /var/cache/apk/*

COPY --from=builder /bor/build/bin/bor /usr/local/bin/
COPY --from=builder /bor/build/bin/bootnode /usr/local/bin/

ENV SHELL /bin/bash
EXPOSE 8545 8546 8547 30303 30303/udp

ENTRYPOINT ["bor"]

0 comments on commit 78ba316

Please sign in to comment.