I have the following Dockerfile:
FROM openmamba/openmamba:latest
COPY . /srv
RUN dnf update --refresh --assumeyes &&
dnf install -y git make &&
git clone --depth=1 https://github.com/vlang/v /usr/local/v &&
cd /usr/local/v &&
make &&
cd /srv &&
/usr/local/v -prod .
CMD ["/srv/exec"]
EXPOSE 8080
The step dnf update --refresh --assumeyes fails, I have attached the log.
Is this expected?
Edit: I'm not allowed to upload the log, I put it on pastebin https://pastebin.com/UddYes2K
Hi,
this is a known problem with rpm unshare plugin failing in a container.
I suggest to use the same workaround which I applied in the openmamba-docker-buildvm project, i.e. before running dnf install a file to the pathname /etc/rpm/macros.transaction_unshare with this content:
%__transaction_unshare %{nil}
I have noticed my containers are failing to build. I think this workaround no longer suffice. I can get around it with the network option in the command (`docker buildx build --network=host --tag ...`), there must be soemthing wrong with the image then
I know that current docker images do work when creating containers in some environments without the --network option.
Since you are reporting that your containers are failing to build but you say that the --network=host option works as a workaround, providing information regarding the docker host and the container build error output or logs would help making your comment useful.
I'll send a system report for host information.
You can see the containerfile here.
I suspect it can't resolve the domain.
Note that the build likely will fail even when updates are downloaded because I have to update the list of dependencies to install with dnf.
docker buildx build --tag blobly --file Containerfile . --load
[+] Building 69.3s (7/8) docker:default
=> [internal] load build definition from Containerfile 0.0s
=> => transferring dockerfile: 697B 0.0s
=> [internal] load metadata for docker.io/openmamba/openmamba:latest 0.0s
=> [internal] load .dockerignore 0.0s
=> => transferring context: 2B 0.0s
=> [internal] load build context 0.0s
=> => transferring context: 19.43kB 0.0s
=> [1/4] FROM docker.io/openmamba/openmamba:latest@sha256:26cb51cd3c02b0a10564ff900a06e1075a9ab3e83dcde9f67d03609a81788675 0.0s
=> => resolve docker.io/openmamba/openmamba:latest@sha256:26cb51cd3c02b0a10564ff900a06e1075a9ab3e83dcde9f67d03609a81788675 0.0s
=> CACHED [2/4] COPY . /srv 0.0s
=> ERROR [3/4] RUN echo '%__transaction_unshare %{nil}' > /etc/rpm/macros.transaction_unshare && dnf update --nogpgcheck --refresh --assumeyes && dnf install --nogpgcheck --assumeyes git make gcc glibc-devel && git clone --depth=1 https://github.com/v 69.1s
------
> [3/4] RUN echo '%__transaction_unshare %{nil}' > /etc/rpm/macros.transaction_unshare && dnf update --nogpgcheck --refresh --assumeyes && dnf install --nogpgcheck --assumeyes git make gcc glibc-devel && git clone --depth=1 https://github.com/vlang/v /opt/v && cd /opt/v && make && cd /srv && /opt/v/v install && /opt/v/v . -o blobly && rm -rf /opt/v && rm -rf /root/.vmodules && dnf remove --assumeyes git make gcc glibc-devel && dnf clean all:
33.83 openmamba base repository [rolling] 0.0 B/s | 0 B 00:00
33.83 Errors during downloading metadata for repository 'rolling':
33.83 - Curl error (6): Could not resolve hostname for https://cdn.openmamba.org/pub/openmamba/base/mirrors/x86_64 [Could not resolve host: cdn.openmamba.org]
33.83 - Curl error (6): Could not resolve hostname for https://cdn.openmamba.org/pub/openmamba/base/mirrors/x86_64 [Could not resolve host: cdn.openmamba.org (Timeout while contacting DNS servers)]
33.83 Error: Failed to download metadata for repo 'rolling': Cannot prepare internal mirrorlist: Curl error (6): Could not resolve hostname for https://cdn.openmamba.org/pub/openmamba/base/mirrors/x86_64 [Could not resolve host: cdn.openmamba.org]
33.83 Ignoring repositories: rolling
33.87 Dependencies resolved.
33.88 Nothing to do.
33.88 Complete!
68.95 openmamba base repository [rolling] 0.0 B/s | 0 B 00:00
68.95 Errors during downloading metadata for repository 'rolling':
68.95 - Curl error (6): Could not resolve hostname for https://cdn.openmamba.org/pub/openmamba/base/mirrors/x86_64 [Could not resolve host: cdn.openmamba.org (Timeout while contacting DNS servers)]
68.95 - Curl error (6): Could not resolve hostname for https://cdn.openmamba.org/pub/openmamba/base/mirrors/x86_64 [Could not resolve host: cdn.openmamba.org]
68.95 Error: Failed to download metadata for repo 'rolling': Cannot prepare internal mirrorlist: Curl error (6): Could not resolve hostname for https://cdn.openmamba.org/pub/openmamba/base/mirrors/x86_64 [Could not resolve host: cdn.openmamba.org]
68.95 Ignoring repositories: rolling
68.96 No match for argument: git
68.96 No match for argument: make
68.96 No match for argument: gcc
68.96 No match for argument: glibc-devel
68.98 Error: Unable to find a match: git make gcc glibc-devel
------
Containerfile:6
--------------------
5 | # workaround https://openmamba.org/en/forums/topic/docker-image-fails-to-update/#post-29474
6 | >>> RUN echo '%__transaction_unshare %{nil}' > /etc/rpm/macros.transaction_unshare && \
7 | >>> dnf update --nogpgcheck --refresh --assumeyes && \
8 | >>> dnf install --nogpgcheck --assumeyes git make gcc glibc-devel && \
9 | >>> git clone --depth=1 https://github.com/vlang/v /opt/v && \
10 | >>> cd /opt/v && \
11 | >>> make && \
12 | >>> cd /srv && \
13 | >>> /opt/v/v install && \
14 | >>> /opt/v/v . -o blobly && \
15 | >>> rm -rf /opt/v && \
16 | >>> rm -rf /root/.vmodules && \
17 | >>> dnf remove --assumeyes git make gcc glibc-devel && \
18 | >>> dnf clean all
19 |
--------------------
ERROR: failed to build: failed to solve: process "/bin/sh -c echo '%__transaction_unshare %{nil}' > /etc/rpm/macros.transaction_unshare && \tdnf update --nogpgcheck --refresh --assumeyes && \tdnf install --nogpgcheck --assumeyes git make gcc glibc-devel && \tgit clone --depth=1 https://github.com/vlang/v /opt/v && \tcd /opt/v && \tmake && \tcd /srv && \t/opt/v/v install && \t/opt/v/v . -o blobly && \trm -rf /opt/v && \trm -rf /root/.vmodules && \tdnf remove --assumeyes git make gcc glibc-devel && \tdnf clean all" did not complete successfully: exit code: 1
$docker run --rm -it openmamba/openmamba /bin/bash -c "ping -c1 google.com" ping: google.com: Temporary failure in name resolution

