mirror of
https://github.com/jimeh/casecmp.git
synced 2026-02-19 10:26:40 +00:00
feat(release): setup for publishing docker images to ghcr
This commit is contained in:
14
Dockerfile
14
Dockerfile
@@ -1,17 +1,5 @@
|
||||
FROM golang:1.16-alpine as builder
|
||||
RUN apk add --no-cache \
|
||||
git
|
||||
|
||||
WORKDIR /app
|
||||
COPY . /app
|
||||
RUN env CGO_ENABLED=0 \
|
||||
go build -a -o /casecmp -ldflags "-s -w \
|
||||
-X main.version=$(cat VERSION) \
|
||||
-X main.commit=$(git show --format='%h' --no-patch) \
|
||||
-X main.date=$(date +%Y-%m-%dT%T%z)"
|
||||
|
||||
FROM scratch
|
||||
COPY --from=builder /casecmp /
|
||||
COPY ./casecmp /
|
||||
ENV PORT 8080
|
||||
EXPOSE 8080
|
||||
WORKDIR /
|
||||
|
||||
Reference in New Issue
Block a user