From c97d6f5361cd2d25be220e4b6fbbf765ef54a794 Mon Sep 17 00:00:00 2001 From: James Park-Watt Date: Fri, 25 Oct 2024 21:10:25 +0100 Subject: [PATCH] refactor: modified build container to use golang:1-alpine This change enables the container to be built for arm64 (and possibly other) architecture. The vanilla alpine image was not used because it does not provide the version of golang required by the go.mod file. --- Dockerfile | 7 +++---- Dockerfile.minimal | 7 +++---- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/Dockerfile b/Dockerfile index 53aaf81..f4c09c9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM luzifer/archlinux as builder +FROM golang:1-alpine AS builder ENV CGO_ENABLED=0 \ GOPATH=/go \ @@ -8,12 +8,11 @@ COPY . /go/src/github.com/Luzifer/ots WORKDIR /go/src/github.com/Luzifer/ots RUN set -ex \ - && pacman --noconfirm -Syy \ + && apk update && apk add \ curl \ git \ - go \ make \ - nodejs-lts-hydrogen \ + nodejs-lts \ npm \ tar \ unzip \ diff --git a/Dockerfile.minimal b/Dockerfile.minimal index e42e1ec..e4f47b3 100644 --- a/Dockerfile.minimal +++ b/Dockerfile.minimal @@ -1,4 +1,4 @@ -FROM luzifer/archlinux as builder +FROM golang:1-alpine AS builder ENV CGO_ENABLED=0 \ GOPATH=/go \ @@ -8,12 +8,11 @@ COPY . /go/src/github.com/Luzifer/ots WORKDIR /go/src/github.com/Luzifer/ots RUN set -ex \ - && pacman --noconfirm -Syy \ + && apk update && apk add \ curl \ git \ - go \ make \ - nodejs-lts-hydrogen \ + nodejs-lts \ npm \ tar \ unzip \