Open Gagrio opened 3 years ago
DOCKER_BUILDKIT=1 docker image build --pull --secret id=SCCcredentials,src=SCCcredentials -t suse-wiki .
[+] Building 13907.2s (8/8) FINISHED
=> [internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 739B 0.0s
=> [internal] load .dockerignore 0.0s
=> => transferring context: 2B 0.0s
=> [internal] load metadata for registry.suse.com/suse/sle15:latest 0.5s
=> CACHED [1/4] FROM registry.suse.com/suse/sle15:latest@sha256:2847fe882f8f22a70acb4d24039705b224ea22c4ffa3cc4ca88ae226bc9e9d63 0.0s
=> [2/4] RUN --mount=type=secret,id=SCCcredentials,required zypper --non-interactive up && zypper --non-interactive install git && zypper --non-inter 13898.4s
=> [3/4] RUN wget https://github.com/wikimedia/mediawiki/archive/refs/heads/REL1_26.zip 5.4s
=> [4/4] RUN unzip -a REL1_26.zip 1.3s
=> exporting to image 1.4s
=> => exporting layers 1.4s
=> => writing image sha256:5e3a6947fa9ce6b8076b9010761cdc0e98e00feda0376606688d604b8609ac21 0.0s
=> => naming to docker.io/library/suse-wiki
# syntax=docker/dockerfile:experimental
FROM registry.suse.com/suse/sle15:latest
LABEL description="SUSE Linux Image with Mediawiki 1.26"
ENV ADDITIONAL_MODULES sle-module-basesystem,sle-module-development-tools
RUN --mount=type=secret,id=SCCcredentials,required \
zypper --non-interactive up && \
zypper --non-interactive install git && \
zypper --non-interactive install wget && \
zypper --non-interactive install unzip
# Download Mediawiki from GitHub
RUN wget https://github.com/wikimedia/mediawiki/archive/refs/heads/REL1_26.zip
RUN unzip -a REL1_26.zip
I'm not able to reproduce this.
One potential issue could be the zypper up
command, which triggers packages to be installed, and this might take a while.
container-suseconnect connects to the SCC API and refreshes the repositories, this is often fast (few seconds). From there, zypper refreshes repositories and installs packages, which can take time.
Hi, I noticed that building images with container-suseconnect can take a very long time
Example:
ENV ADDITIONAL_MODULES sle-module-basesystem,sle-module-development-tools
RUN --mount=type=secret,id=SCCcredentials,required \ zypper --non-interactive up && \ zypper --non-interactive in git