-
-
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.
Signed-off-by: Olivier Vernin <[email protected]>
- Loading branch information
Showing
1 changed file
with
48 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
## Build final releasepost docker image | ||
# We on purpose release artifacts created by goreleaser | ||
# located in the dist directory | ||
|
||
## Goreleaser requires the "--platform" to handle multi-platform builds | ||
# hadolint ignore=DL3029 | ||
FROM --platform=${BUILDPLATFORM} debian:stable-slim | ||
|
||
LABEL maintainer="Olivier Vernin <[email protected]>" | ||
|
||
# Dynamic labels are defined from the goreleaser configuration ".goreleaser.yaml" | ||
LABEL org.opencontainers.image.authors="Olivier Vernin<[email protected]>" | ||
LABEL org.opencontainers.image.url="https://github.com/updatecli/releasepost" | ||
LABEL org.opencontainers.image.documentation="https://github.com/updatecli/releasepost" | ||
LABEL org.opencontainers.image.licenses="APACHEV2" | ||
LABEL org.opencontainers.image.title="Releasepost" | ||
LABEL org.opencontainers.image.description="Re-post release notes" | ||
LABEL org.opencontainers.image.base.name="ghcr.io/updatecli/releasepost" | ||
LABEL org.opencontainers.image.source https://github.com/updatecli/releasepost | ||
|
||
# /tmp is used by updatecli to store git repository so it's better | ||
# to define a volume | ||
VOLUME /tmp | ||
|
||
## The latest version of these "generic" package is always required | ||
# hadolint ignore=DL3008 | ||
RUN apt-get update && \ | ||
apt-get install --yes --no-install-recommends \ | ||
ca-certificates \ | ||
curl \ | ||
tar \ | ||
unzip \ | ||
wget &&\ | ||
apt-get clean && \ | ||
rm -rf /var/lib/apt/lists/* | ||
|
||
# Available files only matched against the binaries generated by the builds section | ||
# and packages generated by the nfpms section. | ||
COPY releasepost /usr/local/bin/releasepost | ||
|
||
RUN useradd -d /home/releasepost -U -u 1000 -m releasepost | ||
|
||
USER releasepost | ||
|
||
WORKDIR /home/releasepost | ||
|
||
ENTRYPOINT [ "/usr/local/bin/releasepost" ] | ||
CMD ["help"] |