-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: apple signing, static builds, easier template clones, better do…
…cs (#44) * feat: support quill (#43) * docs: update README about Apple signing * feat: improve docker for initial use template clone
- Loading branch information
Showing
5 changed files
with
187 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,24 @@ | ||
# syntax=docker/dockerfile:1.6-labs | ||
|
||
FROM debian:bullseye-slim as base | ||
ARG PROJECT_NAME=go-project-template | ||
RUN apt-get update && apt-get install -y ca-certificates && rm -rf /var/lib/apt/lists/* | ||
RUN useradd -r -u 999 -d /home/go-project-template go-project-template | ||
RUN useradd -r -u 999 -d /home/${PROJECT_NAME} ${PROJECT_NAME} | ||
|
||
FROM ghcr.io/acorn-io/images-mirror/golang:1.21 AS build | ||
ARG PROJECT_NAME=go-project-template | ||
COPY / /src | ||
WORKDIR /src | ||
RUN \ | ||
--mount=type=cache,target=/go/pkg \ | ||
--mount=type=cache,target=/root/.cache/go-build \ | ||
go build -o bin/go-project-template main.go | ||
go build -o bin/${PROJECT_NAME} main.go | ||
|
||
FROM base AS goreleaser | ||
COPY go-project-template /usr/local/bin/go-project-template | ||
USER go-project-template | ||
ARG PROJECT_NAME=go-project-template | ||
COPY ${PROJECT_NAME} /usr/local/bin/${PROJECT_NAME} | ||
USER ${PROJECT_NAME} | ||
|
||
FROM base | ||
COPY --from=build /src/bin/go-project-template /usr/local/bin/go-project-template | ||
USER go-project-template | ||
ARG PROJECT_NAME=go-project-template | ||
COPY --from=build /src/bin/${PROJECT_NAME} /usr/local/bin/${PROJECT_NAME} | ||
USER ${PROJECT_NAME} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters