Skip to content

Commit

Permalink
feat(docker): multiarch build
Browse files Browse the repository at this point in the history
  • Loading branch information
missinglink committed Dec 1, 2023
1 parent 3cf1f45 commit 5fa2084
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
1 change: 0 additions & 1 deletion .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,5 @@ jobs:
env:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
DOCKER_BUILD_PLATFORMS: classic
run: |
curl "https://raw.githubusercontent.com/pelias/ci-tools/master/build-docker-images.sh" | bash -
10 changes: 6 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,17 @@ FROM pelias/libpostal_baseimage as builder

RUN apt-get update && apt-get install -y make pkg-config build-essential

# install go
# install Golang
ARG TARGETARCH
RUN curl "https://dl.google.com/go/go1.11.linux-${TARGETARCH}.tar.gz" | tar -C /usr/local -xz
ENV PATH="$PATH:/usr/local/go/bin"
RUN wget -qO- "https://golang.org/dl/go1.21.0.linux-${TARGETARCH}.tar.gz" | tar -C /usr/local -xzf -
ENV GOROOT="/usr/local/go"
ENV GOPATH="$HOME/go"
ENV PATH="${PATH}:$GOROOT/bin:$GOPATH/bin"

# bring in and build project go code
WORKDIR /code/go-whosonfirst-libpostal
RUN git clone https://github.com/whosonfirst/go-whosonfirst-libpostal.git .
RUN make bin
RUN GO111MODULE=off make bin

# start of main image
FROM pelias/libpostal_baseimage
Expand Down

0 comments on commit 5fa2084

Please sign in to comment.