Closed sunilsankar closed 2 years ago
@sunilsankar your input dockerfile has typo in FROM, fixed one build correctly. your successful log uses 9-base
.
Mirrors usually specific to local network or zone. looks good here.
FROM almalinux/9-init
ENV container=docker
CMD ["/sbin/init"]
STOPSIGNAL SIGRTMIN+3
RUN dnf clean all && dnf -y install procps-ng; rm -rf /var/cache /var/log/dnf* /var/log/yum.*
RUN systemctl mask systemd-remount-fs.service dev-hugepages.mount sys-fs-fuse-connections.mount systemd-logind.service getty.target console-getty.service systemd-udev-trigger.service systemd-udevd.service systemd-random-seed.service systemd-machine-id-commit.service
% docker build -t testa -f TestDockerfile .
[+] Building 21.6s (7/7) FINISHED
=> [internal] load build definition from TestDockerfile 0.0s
=> => transferring dockerfile: 501B 0.0s
=> [internal] load .dockerignore 0.0s
=> => transferring context: 2B 0.0s
=> [internal] load metadata for docker.io/almalinux/9-base:latest 1.2s
=> [1/3] FROM docker.io/almalinux/9-base:latest@sha256:beee537db4b00b626678c96e4c2f2c8f86138021e7d6679d76c67be3cbcca644 19.4s
=> => resolve docker.io/almalinux/9-base:latest@sha256:beee537db4b00b626678c96e4c2f2c8f86138021e7d6679d76c67be3cbcca644 0.0s
=> => sha256:53ae608510f69f7acd45bd1cab136a34980974b07b11af0368bd527a4da52c0b 529B / 529B 0.0s
=> => sha256:827d8e93030125ea2b9f00eb3acc6247534c91bf04ac690905ba1f12f3f23d53 1.30kB / 1.30kB 0.0s
=> => sha256:0a65bfccbd96eff0c35edfc73f0f806d3b68040e9e6dab10471feeaddfa89fdb 64.33MB / 64.33MB 15.5s
=> => sha256:beee537db4b00b626678c96e4c2f2c8f86138021e7d6679d76c67be3cbcca644 1.36kB / 1.36kB 0.0s
=> => extracting sha256:0a65bfccbd96eff0c35edfc73f0f806d3b68040e9e6dab10471feeaddfa89fdb 3.8s
=> [2/3] RUN dnf clean all && dnf -y install procps-ng; rm -rf /var/cache /var/log/dnf* /var/log/yum.* 6.3s
=> [3/3] RUN systemctl mask systemd-remount-fs.service dev-hugepages.mount sys-fs-fuse-connections.mount systemd-logind.service getty.target con 0.4s
=> exporting to image 0.1s
=> => exporting layers 0.1s
=> => writing image sha256:e59c652b1a0959739ab5db25fdb7806a9341e024a2e9503c06a2eb05834c794b 0.0s
=> => naming to docker.io/library/testa
@srbala the issue still exist not sure my almalinux9 vm the repos work but not in docker
FROM almalinux/9-init
ENV container=docker
CMD ["/sbin/init"]
STOPSIGNAL SIGRTMIN+3
RUN dnf clean all && dnf -y install procps-ng; rm -rf /var/cache /var/log/dnf* /var/log/yum.*
RUN systemctl mask systemd-remount-fs.service dev-hugepages.mount sys-fs-fuse-connections.mount systemd-logind.service getty.target console-getty.service systemd-udev-trigger.service systemd-udevd.service systemd-random-seed.service systemd-machine-id-commit.service
Sending build context to Docker daemon 39.94kB
Step 1/6 : FROM almalinux/9-init
latest: Pulling from almalinux/9-init
d770a667c323: Pull complete
Digest: sha256:74d3ad6c2a9a0deeedc266b9a0c53223796d632ce95cb78bcec4b2fed28d9bb5
Status: Downloaded newer image for almalinux/9-init:latest
---> 1a041c44ff8e
Step 2/6 : ENV container=docker
---> Running in e97b25c4b80a
Removing intermediate container e97b25c4b80a
---> a6834195ab1a
Step 3/6 : CMD ["/sbin/init"]
---> Running in ebfdce206761
Removing intermediate container ebfdce206761
---> ed9b6279b7ee
Step 4/6 : STOPSIGNAL SIGRTMIN+3
---> Running in 81d8eb71eb35
Removing intermediate container 81d8eb71eb35
---> ea808de9c9f0
Step 5/6 : RUN dnf clean all && dnf -y install procps-ng; rm -rf /var/cache /var/log/dnf* /var/log/yum.*
---> Running in d05f5d68c562
0 files removed
AlmaLinux 9 - AppStream 0.0 B/s | 0 B 00:00
Errors during downloading metadata for repository 'appstream':
- Curl error (6): Couldn't resolve host name for https://mirrors.almalinux.org/mirrorlist/9/appstream [getaddrinfo() thread failed to start]
Error: Failed to download metadata for repo 'appstream': Cannot prepare internal mirrorlist: Curl error (6): Couldn't resolve host name for https://mirrors.almalinux.org/mirrorlist/9/appstream [getaddrinfo() thread failed to start]
Removing intermediate container d05f5d68c562
---> 9bae36edc72c
Step 6/6 : RUN systemctl mask systemd-remount-fs.service dev-hugepages.mount sys-fs-fuse-connections.mount systemd-logind.service getty.target console-getty.service systemd-udev-trigger.service systemd-udevd.service systemd-random-seed.service systemd-machine-id-commit.service
---> Running in 3ca2c356515d
Removing intermediate container 3ca2c356515d
---> f396401c8e5b
Successfully built f396401c8e5b
*[master][~/Gitcode/docker-almalinux9]$ vi Dockerfile
*[master][~/Gitcode/docker-almalinux9]$ docker build .
Sending build context to Docker daemon 39.94kB
Step 1/6 : FROM almalinux/9-base
---> 827d8e930301
Step 2/6 : ENV container=docker
---> Running in 36119f4baace
Removing intermediate container 36119f4baace
---> 1df23e759f57
Step 3/6 : CMD ["/sbin/init"]
---> Running in 16e2d379e6cd
Removing intermediate container 16e2d379e6cd
---> 9670324108ea
Step 4/6 : STOPSIGNAL SIGRTMIN+3
---> Running in aceadc724cd5
Removing intermediate container aceadc724cd5
---> 3e67d029145d
Step 5/6 : RUN dnf clean all && dnf -y install procps-ng; rm -rf /var/cache /var/log/dnf* /var/log/yum.*
---> Running in 47dcd8a14043
0 files removed
AlmaLinux 9 - AppStream 0.0 B/s | 0 B 00:00
Errors during downloading metadata for repository 'appstream':
- Curl error (6): Couldn't resolve host name for https://mirrors.almalinux.org/mirrorlist/9/appstream [getaddrinfo() thread failed to start]
Error: Failed to download metadata for repo 'appstream': Cannot prepare internal mirrorlist: Curl error (6): Couldn't resolve host name for https://mirrors.almalinux.org/mirrorlist/9/appstream [getaddrinfo() thread failed to start]
Removing intermediate container 47dcd8a14043
---> a5e2685c8777
Step 6/6 : RUN systemctl mask systemd-remount-fs.service dev-hugepages.mount sys-fs-fuse-connections.mount systemd-logind.service getty.target console-getty.service systemd-udev-trigger.service systemd-udevd.service systemd-random-seed.service systemd-machine-id-commit.service
---> Running in a1340380850f
Created symlink /etc/systemd/system/systemd-udev-trigger.service → /dev/null.
Created symlink /etc/systemd/system/systemd-udevd.service → /dev/null.
Created symlink /etc/systemd/system/systemd-random-seed.service → /dev/null.
Created symlink /etc/systemd/system/systemd-machine-id-commit.service → /dev/null.
Removing intermediate container a1340380850f
---> 81412fece8dc
Successfully built 81412fece8dc
*[master][~/Gitcode/docker-almalinux9]$
Almalinux 8 docker image works without any issue by not almalinux9 docker image output of docker build for almalinux8
Sending build context to Docker daemon 39.94kB
Step 1/6 : FROM almalinux/8-base
latest: Pulling from almalinux/8-base
b8d32dfbe28d: Pull complete
Digest: sha256:ff26fb4c4279df60e4dfaf8b7ff8e8744dab221b99d1c57cc67ead4ec4f53cee
Status: Downloaded newer image for almalinux/8-base:latest
---> 14c4062e1905
Step 2/6 : ENV container=docker
---> Running in 7ce007265ebd
Removing intermediate container 7ce007265ebd
---> 2972a5989b37
Step 3/6 : CMD ["/sbin/init"]
---> Running in 157a0ae7eebc
Removing intermediate container 157a0ae7eebc
---> 3cc1e4d587df
Step 4/6 : STOPSIGNAL SIGRTMIN+3
---> Running in db8c5789b3fc
Removing intermediate container db8c5789b3fc
---> b0bd09e76c68
Step 5/6 : RUN dnf clean all && dnf -y install procps-ng; rm -rf /var/cache /var/log/dnf* /var/log/yum.*
---> Running in efe057334824
0 files removed
AlmaLinux 8 - BaseOS 3.4 MB/s | 2.7 MB 00:00
AlmaLinux 8 - AppStream 9.6 MB/s | 9.1 MB 00:00
AlmaLinux 8 - Extras 33 kB/s | 18 kB 00:00
Dependencies resolved.
================================================================================
Package Architecture Version Repository Size
================================================================================
Installing:
procps-ng x86_64 3.3.15-6.el8 baseos 328 k
Transaction Summary
================================================================================
Install 1 Package
Total download size: 328 k
Installed size: 880 k
Downloading Packages:
procps-ng-3.3.15-6.el8.x86_64.rpm 2.4 MB/s | 328 kB 00:00
--------------------------------------------------------------------------------
Total 534 kB/s | 328 kB 00:00
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
Preparing : 1/1
Installing : procps-ng-3.3.15-6.el8.x86_64 1/1
Running scriptlet: procps-ng-3.3.15-6.el8.x86_64 1/1
Verifying : procps-ng-3.3.15-6.el8.x86_64 1/1
Installed:
procps-ng-3.3.15-6.el8.x86_64
Complete!
Removing intermediate container efe057334824
---> a591697d0c85
Step 6/6 : RUN systemctl mask systemd-remount-fs.service dev-hugepages.mount sys-fs-fuse-connections.mount systemd-logind.service getty.target console-getty.service systemd-udev-trigger.service systemd-udevd.service systemd-random-seed.service systemd-machine-id-commit.service
---> Running in 95e89334558a
Created symlink /etc/systemd/system/systemd-udev-trigger.service → /dev/null.
Created symlink /etc/systemd/system/systemd-udevd.service → /dev/null.
Created symlink /etc/systemd/system/systemd-random-seed.service → /dev/null.
Created symlink /etc/systemd/system/systemd-machine-id-commit.service → /dev/null.
Removing intermediate container 95e89334558a
---> 0a68f102b9d3
Successfully built 0a68f102b9d3
*[master][~/Gitcode/docker-almalinux9]$
@sunilsankar Please try this command docker run --rm -it almalinux/9-init cat /etc/os-release
post the output.
The almalinux/9-init
already has init
and procps installed. Can you try this, build with --no-cache
option docker build --no-cache -t atest -f TestDockerfile .
FROM almalinux:9
ENV container=docker
CMD ["/sbin/init"]
STOPSIGNAL SIGRTMIN+3
RUN dnf clean all && dnf -y install procps-ng; rm -rf /var/cache /var/log/dnf* /var/log/yum.*
RUN systemctl mask systemd-remount-fs.service dev-hugepages.mount sys-fs-fuse-connections.mount systemd-logind.service getty.target console-getty.service systemd-udev-trigger.service systemd-udevd.service systemd-random-seed.service systemd-machine-id-commit.service
@srbala the issue was with docker version I am running . I use ubuntu as my build server and currently is running 20.10.7 which is not adjusted to support syscall wrapper of glibc 2.34 . This article actually help me solve the issue link Thanks for your help .
After updating the docker version my build was successful with same dockerfile I shared earlier
FROM almalinux/9-init
ENV container=docker
CMD ["/sbin/init"]
STOPSIGNAL SIGRTMIN+3
RUN dnf clean all && dnf -y install procps-ng; rm -rf /var/cache /var/log/dnf* /var/log/yum.*
RUN systemctl mask systemd-remount-fs.service dev-hugepages.mount sys-fs-fuse-connections.mount systemd-logind.service getty.target console-getty.service systemd-udev-trigger.service systemd-udevd.service systemd-random-seed.service systemd-machine-id-commit.service
Sending build context to Docker daemon 39.94kB
Step 1/6 : FROM almalinux/9-init
---> 1a041c44ff8e
Step 2/6 : ENV container=docker
---> Running in 26ad4887cecc
Removing intermediate container 26ad4887cecc
---> 46e4160b3df5
Step 3/6 : CMD ["/sbin/init"]
---> Running in 2e53553e860a
Removing intermediate container 2e53553e860a
---> 22351b773506
Step 4/6 : STOPSIGNAL SIGRTMIN+3
---> Running in 953bd2a6364b
Removing intermediate container 953bd2a6364b
---> bca08f4c51b2
Step 5/6 : RUN dnf clean all && dnf -y install procps-ng; rm -rf /var/cache /var/log/dnf* /var/log/yum.*
---> Running in 7a34ada2a942
0 files removed
AlmaLinux 9 - AppStream 7.9 MB/s | 6.5 MB 00:00
AlmaLinux 9 - BaseOS 3.0 MB/s | 1.9 MB 00:00
AlmaLinux 9 - Extras 21 kB/s | 11 kB 00:00
Package procps-ng-3.3.17-4.el9.x86_64 is already installed.
Dependencies resolved.
Nothing to do.
Complete!
Removing intermediate container 7a34ada2a942
---> cb656905972e
Step 6/6 : RUN systemctl mask systemd-remount-fs.service dev-hugepages.mount sys-fs-fuse-connections.mount systemd-logind.service getty.target console-getty.service systemd-udev-trigger.service systemd-udevd.service systemd-random-seed.service systemd-machine-id-commit.service
---> Running in 787d93092226
Removing intermediate container 787d93092226
---> f927bc7f03ff
Successfully built f927bc7f03ff
Currently I have docker file when I do a docker build I see the following error
Dockerfile
Almalinux 8 works without any issue