-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
2 changed files
with
16 additions
and
26 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 |
---|---|---|
@@ -1,18 +1,9 @@ | ||
FROM --platform=linux/x86_64 alpine:latest | ||
ENV GLIBC_REPO=https://github.com/sgerrand/alpine-pkg-glibc | ||
ENV GLIBC_VERSION=2.35-r0 | ||
RUN set -ex && \ | ||
apk --update add libstdc++ curl ca-certificates && \ | ||
for pkg in glibc-${GLIBC_VERSION} glibc-bin-${GLIBC_VERSION}; \ | ||
do curl -sSL ${GLIBC_REPO}/releases/download/${GLIBC_VERSION}/${pkg}.apk -o /tmp/${pkg}.apk; done && \ | ||
apk add --force-overwrite --allow-untrusted /tmp/*.apk && \ | ||
rm -v /tmp/*.apk && \ | ||
/usr/glibc-compat/sbin/ldconfig /lib /usr/glibc-compat/lib | ||
RUN apk add git | ||
COPY ./sloctl-linux-* /usr/local/bin/sloctl | ||
RUN chmod +x /usr/local/bin/sloctl | ||
RUN adduser -D appuser | ||
RUN mkdir -p /home/appuser/.config/nobl9 | ||
RUN chown -R appuser:appuser /home/appuser/.config/nobl9 | ||
USER appuser | ||
FROM curlimages/curl:latest AS builder | ||
ARG VERSION | ||
RUN curl -sL https://github.com/nobl9/sloctl/releases/download/$VERSION/sloctl-linux-${VERSION/v/} -o /tmp/sloctl | ||
RUN chmod +x /tmp/sloctl | ||
|
||
FROM scratch | ||
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ | ||
COPY --from=builder /tmp/sloctl /usr/bin/ | ||
ENTRYPOINT ["sloctl"] |
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