mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-14 16:03:45 +00:00
Adapt Dockerfile for development (#237)
* 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.
This commit is contained in:
parent
322e964233
commit
78ba316bcb
1 changed files with 8 additions and 20 deletions
28
Dockerfile
28
Dockerfile
|
|
@ -1,29 +1,17 @@
|
||||||
# Build Geth in a stock Go builder container
|
FROM golang:latest
|
||||||
FROM golang:1.17-alpine as builder
|
|
||||||
|
|
||||||
RUN set -x \
|
ARG BOR_DIR=/bor
|
||||||
&& buildDeps='bash build-base musl-dev linux-headers git' \
|
ENV BOR_DIR=$BOR_DIR
|
||||||
&& apk add --update $buildDeps \
|
|
||||||
&& rm -rf /var/cache/apk/* \
|
RUN apt-get update -y && apt-get upgrade -y \
|
||||||
|
&& apt install build-essential git tini -y \
|
||||||
&& mkdir -p /bor
|
&& mkdir -p /bor
|
||||||
|
|
||||||
WORKDIR /bor
|
WORKDIR ${BOR_DIR}
|
||||||
COPY . .
|
COPY . .
|
||||||
RUN make bor-all
|
RUN make bor-all
|
||||||
|
|
||||||
CMD ["/bin/bash"]
|
ENV SHELL /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/
|
|
||||||
|
|
||||||
EXPOSE 8545 8546 8547 30303 30303/udp
|
EXPOSE 8545 8546 8547 30303 30303/udp
|
||||||
|
|
||||||
ENTRYPOINT ["bor"]
|
ENTRYPOINT ["bor"]
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue