I created a folder in Windows that has a Dockerfile
and an install.sh
script. When I attempt to build the docker image, I get an error that says:
=> ERROR [4/4] RUN /install.sh 0.6s
------
> [4/4] RUN /install.sh:
#7 0.584 /bin/sh: 1: /install.sh: not found
This is my Dockerfile
:
FROM ubuntu:latest
ADD install.sh /
RUN chmod u+x /install.sh
RUN /install.sh
ENV PATH /root/miniconda3/bin:$PATH
This is my install.sh
:
#!/bin/bash
apt-get update
apt-get upgrade -y
apt-get install -y bzip2 gcc git ping htop screen vim wget
apt-get clean
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O Miniconda.sh
bash Miniconda.sh -b
rm -rf Miniconda.sh
export PATH="/root/miniconda3/bin:$PATH"
conda install -y pandas
sh -c "$(wget https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh -O -)"
CMD ["/bin/zsh"]
This is what I am running in Windows to produce the error:
docker build -t app_test:v1.01 .
output:
[+] Building 1.3s (8/8) FINISHED
=> [internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 158B 0.0s
=> [internal] load .dockerignore 0.0s
=> => transferring context: 2B 0.0s
=> [internal] load metadata for docker.io/library/ubuntu:latest 0.0s
=> [internal] load build context 0.0s
=> => transferring context: 490B 0.0s
=> CACHED [1/4] FROM docker.io/library/ubuntu:latest 0.0s
=> [2/4] ADD install.sh / 0.0s
=> [3/4] RUN chmod u+x /install.sh 0.5s
=> ERROR [4/4] RUN /install.sh 0.6s
------
> [4/4] RUN /install.sh:
#7 0.584 /bin/sh: 1: /install.sh: not found
------
executor failed running [/bin/sh -c /install.sh]: exit code: 127