Skip to content

Commit

Permalink
try to build docker simpler from ubuntu to alpine
Browse files Browse the repository at this point in the history
  • Loading branch information
sduchesneau committed Dec 8, 2023
1 parent b85f490 commit 59ad1bf
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 25 deletions.
22 changes: 2 additions & 20 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 }}
Expand Down
22 changes: 17 additions & 5 deletions Dockerfile.fh
Original file line number Diff line number Diff line change
@@ -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"]

0 comments on commit 59ad1bf

Please sign in to comment.