-
Notifications
You must be signed in to change notification settings - Fork 158
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Switching base image to ubi8-minimal #536
Changes from 3 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,10 @@ | ||
FROM ARG_FROM | ||
ARG base_image=registry.access.redhat.com/ubi8/ubi-minimal:8.1 | ||
FROM ${base_image} | ||
MAINTAINER Tom Manville<tom@kasten.io> | ||
ADD ARG_SOURCE_BIN /ARG_BIN | ||
RUN apk -v --update add --no-cache ca-certificates && \ | ||
rm -f /var/cache/apk/* | ||
RUN microdnf install git shadow-utils && \ | ||
microdnf clean all && \ | ||
adduser -U kanister | ||
|
||
USER kanister | ||
ADD --chown=kanister:kanister ARG_SOURCE_BIN /ARG_BIN | ||
ENTRYPOINT ["/ARG_BIN"] |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,9 +28,8 @@ if [ -z "${ARCH:-""}" ]; then | |
echo "ARCH must be set" | ||
exit 1 | ||
fi | ||
if [ -z "${BASEIMAGE:-""}" ]; then | ||
echo "BASEIMAGE must be set" | ||
exit 1 | ||
if [ -n "${BASEIMAGE:-""}" ]; then | ||
baseimagearg="--build-arg base_image=${BASEIMAGE}" | ||
fi | ||
if [ -z "${IMAGE:-""}" ]; then | ||
echo "IMAGE must be set" | ||
|
@@ -48,8 +47,7 @@ fi | |
sed \ | ||
-e "s|ARG_BIN|${BIN}|g" \ | ||
-e "s|ARG_ARCH|${ARCH}|g" \ | ||
-e "s|ARG_FROM|${BASEIMAGE}|g" \ | ||
-e "s|ARG_SOURCE_BIN|${SOURCE_BIN}|g" \ | ||
Dockerfile.in > .dockerfile-${ARCH} | ||
docker build -t ${IMAGE}:${VERSION} -f .dockerfile-${ARCH} . | ||
docker build ${baseimagearg:-} -t ${IMAGE}:${VERSION} -f .dockerfile-${ARCH} . | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. build args make way more sense. I think this pattern was something I copied from Tim Hockins. Let's switch to build args completely in a followup. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. sounds good to me ;) |
||
docker images -q ${IMAGE}:${VERSION} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,8 @@ | ||
FROM alpine:3.10 | ||
FROM registry.access.redhat.com/ubi8/ubi-minimal:8.1 | ||
MAINTAINER Tom Manville<tom@kasten.io> | ||
RUN apk -v --update add --no-cache ca-certificates && \ | ||
rm -f /var/cache/apk/* | ||
ADD controller /controller | ||
RUN microdnf install git shadow-utils && \ | ||
microdnf clean all && \ | ||
adduser -U kanister | ||
USER kanister | ||
ADD --chown=kanister:kanister controller /controller | ||
ENTRYPOINT ["/controller"] |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,13 @@ | ||
FROM alpine:3.10 | ||
FROM registry.access.redhat.com/ubi8/ubi-minimal:8.1 | ||
|
||
RUN apk -v --update add --no-cache bash curl groff less mailcap ca-certificates && \ | ||
rm -f /var/cache/apk/* | ||
RUN microdnf install git shadow-utils && \ | ||
microdnf clean all && \ | ||
adduser -U kanister | ||
|
||
COPY --from=restic/restic:0.9.5 /usr/bin/restic /usr/local/bin/restic | ||
COPY --from=kanisterio/kopia:alpine-2fb6bc8 /kopia/kopia /usr/local/bin/kopia | ||
ADD kando /usr/local/bin/ | ||
COPY --chown=kanister:kanister --from=restic/restic:0.9.5 /usr/bin/restic /usr/local/bin/restic | ||
COPY --chown=kanister:kanister --from=kanisterio/kopia:alpine-2fb6bc8 /kopia/kopia /usr/local/bin/kopia | ||
ADD --chown=kanister:kanister kando /usr/local/bin/ | ||
|
||
USER kanister | ||
|
||
CMD [ "/usr/bin/tail", "-f", "/dev/null" ] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we use this file anymore? Let's remove it if not
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not sure... let me check.
make file is using package.sh
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's part of goreleaser :(
nice catch
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
goreleaser uses https://github.com/kanisterio/kanister/blob/master/.goreleaser.yml#L43
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we probably need a way of auto get docker files for goreleaser
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we do use
Dockerfile.in
in k10: