Skip to content
This repository has been archived by the owner on Feb 2, 2023. It is now read-only.

articulate/docker-articulate-golang

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Articulate Golang Images

Deprecated: See notes below

Base golang image

Deploying Go Applications

Since you compile Go applications, you shouldn't be deploying Go services with this image. Instead you should use a multistage build.

# syntax=docker/dockerfile:1
FROM golang:1.20 AS build

COPY go.mod go.sum ./
RUN go mod download

COPY . .
RUN go build -o /service

FROM debian:bullseye

ARG TARGETARCH
ADD --chmod=755 https://github.com/articulate/docker-consul-template-bootstrap/releases/latest/download/docker-consul-template-bootstrap_linux_${TARGETARCH} /entrypoint

COPY --from=build /service /service

ENTRYPOINT [ "/entrypoint" ]
CMD [ "/service" ]