Skip to content

Not able to create the Image #154

@Aditya-Terraform

Description

@Aditya-Terraform

docker build -t cd3demo:v1 -f Dockerfile --pull --no-cache .
[+] Building 74.4s (6/16) docker:default
=> [internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 5.24kB 0.0s
=> [internal] load .dockerignore 0.0s
=> => transferring context: 2B 0.0s
=> [internal] load metadata for docker.io/library/oraclelinux:9-slim 10.6s
=> CACHED [ 1/12] FROM docker.io/library/oraclelinux:9-slim@sha256:76f5a550d2541d31fd8314aa8bd80cab01bb7d74bd24e3d91afa7e2580646e6c 0.0s
=> [internal] load build context 0.1s
=> => transferring context: 5.46MB 0.1s
=> ERROR [ 2/12] RUN microdnf install -y sudo && groupadd --gid 1001 cd3user && useradd --uid 1001 --gid 1001 cd3user && echo cd3user ALL=(root) NOPASSWD:ALL > 63.8s

[ 2/12] RUN microdnf install -y sudo && groupadd --gid 1001 cd3user && useradd --uid 1001 --gid 1001 cd3user && echo cd3user ALL=(root) NOPASSWD:ALL > /etc/sudoers.d/cd3user && chmod 0440 /etc/sudoers.d/cd3user && mkdir -p /cd3user/tenancies && chown -R cd3user:cd3user /cd3user/tenancies/ && microdnf install -y vim && microdnf install -y dnf && microdnf install -y wget && microdnf install -y unzip && microdnf install -y graphviz && ln -sf /usr/bin/python3 /usr/bin/python && echo 'alias vi="vim"' >> /etc/bashrc:
0.319 Downloading metadata...
63.76 error: cannot update repo 'ol9_baseos_latest': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried; Last error: Curl error (28): Timeout was reached for https://yum.oracle.com/repo/OracleLinux/OL9/baseos/latest/x86_64/repodata/repomd.xml [Failed to connect to yum.oracle.com port 443: Connection timed out]


Dockerfile:22

21 |
22 | >>> RUN microdnf install -y sudo &&
23 | >>> groupadd --gid $USER_GID $USERNAME &&
24 | >>> useradd --uid $USER_UID --gid $USER_GID $USERNAME &&
25 | >>> echo $USERNAME ALL=(root) NOPASSWD:ALL > /etc/sudoers.d/$USERNAME &&
26 | >>> chmod 0440 /etc/sudoers.d/$USERNAME &&
27 | >>> mkdir -p /cd3user/tenancies &&
28 | >>> chown -R $USERNAME:$USERNAME /cd3user/tenancies/ &&
29 | >>> microdnf install -y vim &&
30 | >>> microdnf install -y dnf &&
31 | >>> microdnf install -y wget &&
32 | >>> microdnf install -y unzip &&
33 | >>> microdnf install -y graphviz &&
34 | >>> ln -sf /usr/bin/python3 /usr/bin/python &&
35 | >>> echo 'alias vi="vim"' >> /etc/bashrc
36 |

ERROR: failed to solve: process "/bin/sh -c microdnf install -y sudo && groupadd --gid $USER_GID $USERNAME && useradd --uid $USER_UID --gid $USER_GID $USERNAME && echo $USERNAME ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/$USERNAME && chmod 0440 /etc/sudoers.d/$USERNAME && mkdir -p /cd3user/tenancies && chown -R $USERNAME:$USERNAME /cd3user/tenancies/ && microdnf install -y vim && microdnf install -y dnf && microdnf install -y wget && microdnf install -y unzip && microdnf install -y graphviz && ln -sf /usr/bin/python3 /usr/bin/python && echo 'alias vi="vim"' >> /etc/bashrc" did not complete successfully: exit code: 1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions