diff --git a/Containerfile b/Containerfile index dc7f758..a697f6e 100644 --- a/Containerfile +++ b/Containerfile @@ -1,9 +1,10 @@ -FROM registry.access.redhat.com/ubi8/ubi-minimal AS build +FROM registry.access.redhat.com/ubi9/ubi-minimal AS build RUN microdnf update -y --refresh --best --nodocs --noplugins --setopt=install_weak_deps=0 && \ microdnf install -y --refresh --best --nodocs --noplugins --setopt=install_weak_deps=0 zip unzip make git gcc && \ microdnf install -y --refresh --best --nodocs --noplugins --setopt=install_weak_deps=0 go-toolset ca-certificates && \ microdnf clean all && \ rm -rf /var/cache/yum +WORKDIR /app/ ENV GOPATH /tmp/go ENV PATH $PATH:$GOPATH/bin @@ -18,8 +19,8 @@ FROM registry.access.redhat.com/ubi9/ubi-minimal ARG USER_UID ARG USER_NAME -ENV USER_UID 1001 -ENV USER_NAME apic +ENV USER_UID ${USER_UID:-1001} +ENV USER_NAME ${USER_NAME:-apic} RUN mkdir -p ${HOME} && chown ${USER_UID}:0 ${HOME} && chmod ug+rwx ${HOME} COPY --from=build /app/out/trawler /app/trawler @@ -27,11 +28,10 @@ COPY base-config.yaml /app/config/config.yaml USER root RUN microdnf upgrade -y --refresh --best --nodocs --noplugins --setopt=install_weak_deps=0 \ - && microdnf clean all + && microdnf clean all USER 1001:0 EXPOSE 63512 ENV CONFIG_PATH=/app/config/config.yaml CMD ["/app/trawler"] -