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.
This commit is contained in:
James Park-Watt 2024-10-25 21:10:25 +01:00
parent e9371c90a0
commit c97d6f5361
2 changed files with 6 additions and 8 deletions

View File

@ -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 \

View File

@ -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 \