This repository contains Dockerfiles with Golang images based on Alpine and OracleLinux.
Images in GitHub Container Registry:
ghcr.io/essentialkaos/golang:alpine3.18
ghcr.io/essentialkaos/golang:alpine3.19
ghcr.io/essentialkaos/golang:alpine3.20
ghcr.io/essentialkaos/golang:alpine3.21
ghcr.io/essentialkaos/golang:ol8
ghcr.io/essentialkaos/golang:ol9
Images in DockerHub:
essentialkaos/golang:alpine3.18
essentialkaos/golang:alpine3.19
essentialkaos/golang:alpine3.20
essentialkaos/golang:alpine3.21
essentialkaos/golang:ol8
essentialkaos/golang:ol9
## REGISTRY CONFIGURATION ######################################################
ARG REGISTRY="docker.io"
## BUILDER #####################################################################
FROM ${REGISTRY}/essentialkaos/golang:alpine3.20 as builder
WORKDIR /go/src/github.com/johndoe/app
COPY . .
RUN make deps && make all
## FINAL IMAGE #################################################################
FROM ${REGISTRY}/essentialkaos/alpine:3.20
COPY --from=builder /go/src/github.com/johndoe/app/app /usr/bin/
# hadolint ignore=DL3018
RUN apk add --no-cache ca-certificates
ENTRYPOINT ["app"]
################################################################################
Before contributing to this project please read our Contributing Guidelines.