diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b55bfbdccb..b1badac12e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -6,9 +6,9 @@ jobs: steps: - uses: actions/checkout@v2 - name: Install Go - uses: actions/setup-go@v2.1.3 + uses: actions/setup-go@v2 with: - go-version: 1.16.7 + go-version: 1.17 - name: "Build binaries" run: make all - name: "Run tests" diff --git a/Dockerfile b/Dockerfile index c03cfacad8..c12a8b1f4e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,18 +1,29 @@ # Build Geth in a stock Go builder container FROM golang:1.17-alpine as builder -RUN apk add --no-cache make gcc musl-dev linux-headers git bash +RUN set -x \ + && buildDeps='bash build-base musl-dev linux-headers git' \ + && apk add --update $buildDeps \ + && rm -rf /var/cache/apk/* \ + && mkdir -p /bor -ADD . /bor -RUN cd /bor && make bor-all +WORKDIR /bor +COPY . . +RUN make bor-all CMD ["/bin/bash"] # Pull Bor into a second stage deploy alpine container -FROM alpine:latest +FROM alpine:3.14 + +RUN set -x \ + && apk add --update --no-cache \ + ca-certificates \ + && rm -rf /var/cache/apk/* -RUN apk add --no-cache ca-certificates 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 \ No newline at end of file +EXPOSE 8545 8546 8547 30303 30303/udp + +ENTRYPOINT ["bor"] diff --git a/Dockerfile.alltools b/Dockerfile.alltools index 10cf1392e7..53be8bc950 100644 --- a/Dockerfile.alltools +++ b/Dockerfile.alltools @@ -9,7 +9,10 @@ RUN cd /bor && make bor-all # Pull all binaries into a second stage deploy alpine container FROM alpine:latest -RUN apk add --no-cache ca-certificates +RUN set -x \ + && apk add --update --no-cache \ + ca-certificates \ + && rm -rf /var/cache/apk/* COPY --from=builder /bor/build/bin/* /usr/local/bin/ -EXPOSE 8545 8546 30303 30303/udp \ No newline at end of file +EXPOSE 8545 8546 30303 30303/udp