<p>I am new to Docker and trying to run a webserver written in Python. I am using Linux Debian running as virtual machine on a Windows host. I have mounted the required folder from my Windows host to the virtual machine. So when I make changes to the folder in Windows, the same change is reflected in my VM. The folder name is &quot;resultsdb&quot; and it contains all the Python files,etc. The folder contents are [in Debian VM] :</p>
<p><a href="https://i.sstatic.net/eNSOf.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/eNSOf.png" alt="enter image description here" /></a></p>
<p><code>docker run hello-world</code> is working successfully. I am using <code>docker build -t resultsdb .</code> (with a dot at the end) to build the Docker image. But I am getting the following error:</p>
<p><a href="https://i.sstatic.net/nTUaq.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/nTUaq.png" alt="enter image description here" /></a></p>
<p>Please tell me where I am going wrong. Thanks !</p>
<p><strong>Edit</strong> : The contents of Dockerfile are below :</p>
<pre><code>##############################################################################
# Base image
##############################################################################
FROM centos:6.9 as resultsdbbase

# The CentOS package index for old releases has been moved...
RUN sed -i 's/^mirrorlist/#mirrorlist/' /etc/yum.repos.d/CentOS-Base.repo &amp;&amp; \
    sed -i 's/^#baseurl/baseurl/' /etc/yum.repos.d/CentOS-Base.repo &amp;&amp; \
    sed -i 's/mirror.centos.org/vault.centos.org/' /etc/yum.repos.d/CentOS-Base.repo

RUN yum -y update &amp;&amp; \
    yum -y install epel-release &amp;&amp; \
    rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6

RUN yum -y update &amp;&amp; \
    yum -y install \
        python \
        mysql-libs \
        openldap \
        freetype \
        libpng \
    &amp;&amp; yum clean all

##############################################################################
# Builder image
##############################################################################
FROM resultsdbbase as resultsdbbuilder

RUN yum -y update &amp;&amp; \
    yum -y install \
        gcc \
        gcc-gfortran \
        gcc-c++ \
        python-devel \
        python-virtualenv \
        mysql-devel \
        openldap-devel \
        freetype-devel \
        libpng-devel \
    &amp;&amp; yum clean all

COPY install /tmp/install

RUN cd /tmp/install; bash install.sh

##############################################################################
# Runtime image
##############################################################################
FROM resultsdbbase

RUN useradd -u 1000 testresults

COPY --from=resultsdbbuilder /appenv /appenv

WORKDIR /app

ENV PATH /appenv/bin:$PATH

COPY app /app

RUN python setup.py develop &amp;&amp; python -m compileall /app/testresults

COPY docker-entrypoint.sh /docker-entrypoint.sh
ENTRYPOINT [&quot;/docker-entrypoint.sh&quot;]

USER testresults

EXPOSE 8080
CMD [&quot;serve&quot;]
</code></pre>
<p>I've read that Docker has withdrawn support for <a href="https://hub.docker.com/_/centos" rel="nofollow noreferrer">CentOS</a>.</p>

CC BY-SA 4.0
2023-05-03T13:56:03.863Z
could you please replace the screenshots with text that can be understood by search engines? It would help if you could provide the dockerfile too
Bruce Becker
CC BY-SA 4.0
2023-05-04T11:08:14.420Z
@BruceBecker Please see the contents of Dockerfile. I think there may be some problem with the base image.
MAJID AHMAD
CC BY-SA 4.0
2023-05-05T15:48:33.250Z
Centos 6 is end of life, that's your problem. If you're following a tutorial, try to find a more recent example, or update the Docker file yourself - this is a good exercise and pointing to a new version of Centos could be all you need.
Kate
<docker><dockerfile><centos>
Unable to understand Docker error
MAJID AHMAD
# Unable to understand Docker error

(Asked by: username_0 on 2023-05-03)

I am new to Docker and trying to run a webserver written in Python. I am using Linux Debian running as virtual machine on a Windows host. I have mounted the required folder from my Windows host to the virtual machine. So when I make changes to the folder in Windows, the same change is reflected in my VM. The folder name is "resultsdb" and it contains all the Python files,etc. The folder contents are [in Debian VM] :

docker run hello-world is working successfully. I am using docker build -t resultsdb . (with a dot at the end) to build the Docker image. But I am getting the following error:

Please tell me where I am going wrong. Thanks !
Edit : The contents of Dockerfile are below :
##############################################################################
# Base image
##############################################################################
FROM centos:6.9 as resultsdbbase

# The CentOS package index for old releases has been moved...
RUN sed -i 's/^mirrorlist/#mirrorlist/' /etc/yum.repos.d/CentOS-Base.repo && \
    sed -i 's/^#baseurl/baseurl/' /etc/yum.repos.d/CentOS-Base.repo && \
    sed -i 's/mirror.centos.org/vault.centos.org/' /etc/yum.repos.d/CentOS-Base.repo

RUN yum -y update && \
    yum -y install epel-release && \
    rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6

RUN yum -y update && \
    yum -y install \
        python \
        mysql-libs \
        openldap \
        freetype \
        libpng \
    && yum clean all

##############################################################################
# Builder image
##############################################################################
FROM resultsdbbase as resultsdbbuilder

RUN yum -y update && \
    yum -y install \
        gcc \
        gcc-gfortran \
        gcc-c++ \
        python-devel \
        python-virtualenv \
        mysql-devel \
        openldap-devel \
        freetype-devel \
        libpng-devel \
    && yum clean all

COPY install /tmp/install

RUN cd /tmp/install; bash install.sh

##############################################################################
# Runtime image
##############################################################################
FROM resultsdbbase

RUN useradd -u 1000 testresults

COPY --from=resultsdbbuilder /appenv /appenv

WORKDIR /app

ENV PATH /appenv/bin:$PATH

COPY app /app

RUN python setup.py develop && python -m compileall /app/testresults

COPY docker-entrypoint.sh /docker-entrypoint.sh
ENTRYPOINT ["/docker-entrypoint.sh"]

USER testresults

EXPOSE 8080
CMD ["serve"]

I've read that Docker has withdrawn support for CentOS.

**Tags:** docker, dockerfile, centos

> **Comments:**
> **username_1**: could you please replace the screenshots with text that can be understood by search engines? It would help if you could provide the dockerfile too  
> **username_0**: @BruceBecker Please see the contents of Dockerfile. I think there may be some problem with the base image.  
> **username_2**: Centos 6 is end of life, that's your problem. If you're following a tutorial, try to find a more recent example, or update the Docker file yourself - this is a good exercise and pointing to a new version of Centos could be all you need.  

---

## 0 answers

