[Error Image] I am using Windows 10 and try to build a Dockerfile using wsl 2. However, I am facing this error:
g@Lucy:/mnt/c/Users/rma$ cd bsgen
g@Lucy:/mnt/c/Users/rma/bsgen$ docker build -t myimage1:1.0 .
[ ] Building 7.0s (7/19) => [internal] load build definition from Dockerfile 0.1s
=> => transferring dockerfile: 38B 0.1s
=> [internal] load .dockerignore 0.1s
=> => transferring context: 2B 0.0s
=> [internal] load metadata for docker.io/library/openjdk:8 3.7s
=> [ 1/16] FROM docker.io/library/openjdk:8@sha256:c498405e558f67cea05d04d63c5daf930d0c1fbbf451c8f04f0e2321d740c 0.0s
=> => resolve docker.io/library/openjdk:8@sha256:c498405e558f67cea05d04d63c5daf930d0c1fbbf451c8f04f0e2321d740cb8 0.0s
=> CACHED [ 2/16] RUN apt-get update 0.0s
=> CACHED [ 3/16] RUN apt-get install -y python3 python3-pip 0.0s
[ 4/16] RUN apt-get -y install python3-pydot python-pydot python-pydot-ng graphviz:
#7 1.094 Reading package lists...
#7 2.076 Building dependency tree...
#7 2.293 Reading state information...
#7 2.501 E: Unable to locate package python-pydot
#7 2.501 E: Unable to locate package python-pydot-ng
executor failed running [/bin/sh -c apt-get -y install python3-pydot python-pydot python-pydot-ng graphviz]: exit code: 100
Can anyone help with it? I am using Ubuntu 18.04. Thank you so much in advance!
I've tried to do on Windows Terminal and faced the same error. I did install the python-pydot, pynot--ng, and graphviz but it wouldn't help me to solve this issue.
I am really new to everything, just installed Docker and WSL.. So it would be great if you can give de some guidance in detail, please.
CodePudding user response:
It appears that you are working with python3, so you should install the python3 versions of pydot
and pydot-ng
: the already requested python3-pydot
and the python3-pydot-ng
package.
Change the Dockerfile contents to the following:
FROM openjdk:8
RUN apt-get update && apt-get install -y python3 python3-pip
RUN apt-get -y install python3-pydot python3-pydot-ng graphviz
RUN apt-get -y install python3-tk
RUN apt-get -y install zip unzip
RUN apt-get -y install gcc gfortran python-dev libopenblas-dev liblapack-dev cython
RUN apt-get -y install g libboost-all-dev libncurses5-dev wget
RUN apt-get -y install libtool flex bison pkg-config g libssl-dev automake
RUN apt-get -y install libjemalloc-dev libboost-dev libboost-filesystem-dev libboost-system-dev libboost-regex-dev python3-dev autoconf flex bison cmake
RUN apt-get -y install libxml2-dev libxslt-dev libfreetype6-dev libsuitesparse-dev
RUN pip3 install -U wheel six pytest
RUN pip3 install backcall==0.2.0 colorama==0.4.4 cycler==0.10.0 decorator==5.0.7 deprecation==2.1.0 graphviz==0.16 intervaltree==3.1.0 ipython==7.22.0 ipython-genutils==0.2.0 jedi==0.18.0 jinja2==3.0.0a1 joblib==1.0.1 jsonpickle==2.0.0 kiwisolver==1.3.1 lxml==4.6.3 MarkupSafe==2.0.0rc1 matplotlib==3.4.1 mpmath==1.2.1 networkx==2.5.1 numpy==1.20.2 packaging==20.9 pandas==1.2.4 parso==0.8.2 pickleshare==0.7.5 pillow==8.2.0 prompt-toolkit==3.0.18 pulp==2.1 pydotplus==2.0.2 pygments==2.8.1 pyparsing==3.0.0b2 python-dateutil==2.8.1 pytz==2021.1 pyvis==0.1.9 scikit-learn==0.24.1 scipy==1.6.2 setuptools==56.0.0 six==1.15.0 sortedcontainers==2.3.0 stringdist==1.0.9 sympy==1.8 threadpoolctl==2.1.0 tqdm==4.60.0 traitlets==5.0.5 wcwidth==0.2.5
RUN pip3 install pm4py
RUN pip3 install notebook ipywidgets
WORKDIR /home/lgarcia