From 59ad1bf343bb4c396e8a305e116f6315ae98b4c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Duchesneau?= Date: Fri, 8 Dec 2023 14:31:56 -0500 Subject: [PATCH] try to build docker simpler from ubuntu to alpine --- .github/workflows/docker.yml | 22 ++-------------------- Dockerfile.fh | 22 +++++++++++++++++----- 2 files changed, 19 insertions(+), 25 deletions(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 89ca58474756..d8bf6199d96a 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -21,25 +21,7 @@ jobs: packages: write steps: - - name: Checkout repository - uses: actions/checkout@v3 - - - name: Install Go - uses: actions/setup-go@v3 - with: - go-version: 1.20.x - - - uses: actions/cache@v3 - with: - path: | - ~/go/pkg/mod - ~/.cache/go-build - key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} - restore-keys: | - ${{ runner.os }}-go- - - - name: Build Binary - run: make bor + - uses: actions/checkout@v3 - name: Log in to the Container registry uses: docker/login-action@v2 @@ -65,7 +47,7 @@ jobs: - name: Build and push Docker image uses: docker/build-push-action@v4 with: - context: ./build/bin + context: . file: ./Dockerfile.fh push: true tags: ${{ steps.meta.outputs.tags }} diff --git a/Dockerfile.fh b/Dockerfile.fh index f5dd96903c7b..4ebbf01b833a 100644 --- a/Dockerfile.fh +++ b/Dockerfile.fh @@ -1,7 +1,19 @@ -FROM ubuntu:20.04 +FROM golang:latest -RUN DEBIAN_FRONTEND=noninteractive apt-get update && \ - apt-get -y install -y ca-certificates libssl1.1 +ARG BOR_DIR=/var/lib/bor +ENV BOR_DIR=$BOR_DIR -ADD ./bor /app/geth -ENTRYPOINT /app/geth +RUN apt-get update -y && apt-get upgrade -y \ + && apt install build-essential git -y \ + && mkdir -p ${BOR_DIR} + +WORKDIR ${BOR_DIR} +COPY . . +RUN make bor + +RUN cp build/bin/bor /usr/local/bin/geth + +ENV SHELL /bin/bash +EXPOSE 8545 8546 8547 30303 30303/udp + +ENTRYPOINT ["geth"]