Cannot build the image
Closed this issue · 5 comments
Hi. I get this error while running: docker build --tag brandone211/lichess .
sudo: unable to execute /home/lichess/build/node-init.sh: No such file or directory
Hello, are you trying to build from the directory cloned from github? The needed file is here: https://github.com/BrandonE/lichocker/blob/master/build/node-init.sh
Yes, here is output of docker build --tag brandone211/lichess .
command
Sending build context to Docker daemon 322.1MB
Step 1/13 : FROM ubuntu:bionic-20191202
---> 549b9b86cb8d
Step 2/13 : SHELL ["/bin/bash", "-c"]
---> Using cache
---> 7e57244d35f9
Step 3/13 : RUN useradd -ms /bin/bash lichess && apt-get update && apt update && apt-get install sudo && echo "lichess ALL = NOPASSWD : ALL" >> /etc/sudoers
---> Using cache
---> 7a00e689961f
Step 4/13 : ENV TZ=Etc/GMT
---> Using cache
---> 85606f260512
Step 5/13 : RUN sudo ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && sudo echo $TZ > /etc/timezone
---> Using cache
---> 8a8c2376f69b
Step 6/13 : USER lichess
---> Using cache
---> ea32ec50a06e
Step 7/13 : ADD build /home/lichess/build
---> Using cache
---> 9e2ed591f314
Step 8/13 : RUN export HOME=/home/lichess && sudo /home/lichess/build/node-init.sh && sudo apt-key add /home/lichess/build/signatures/yarn.asc && echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list && sudo apt-key add /home/lichess/build/signatures/mongodb-org.asc && echo "deb [ arch=amd64 ] https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/4.2 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.2.list && sudo apt-get update && sudo apt update && sudo apt-get install -y unzip zip nodejs mongodb-org parallel && sudo apt install -y yarn redis-server git-all && /home/lichess/build/sdkman-init.sh && source "$HOME/.sdkman/bin/sdkman-init.sh" && sdk install java 13.0.1.hs-adpt && sdk install sbt && sudo yarn global add gulp-cli && sudo mkdir -p ~/.parallel && sudo touch ~/.parallel/will-cite && sudo mkdir -p /data/db && sudo chmod 666 /data/db && sudo apt-get autoremove -y && sudo apt-get clean && sudo rm -rf /home/lichess/build
---> Running in a2c1a00f6bb1
sudo: unable to execute /home/lichess/build/node-init.sh: No such file or directory
The command '/bin/bash -c export HOME=/home/lichess && sudo /home/lichess/build/node-init.sh && sudo apt-key add /home/lichess/build/signatures/yarn.asc && echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list && sudo apt-key add /home/lichess/build/signatures/mongodb-org.asc && echo "deb [ arch=amd64 ] https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/4.2 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.2.list && sudo apt-get update && sudo apt update && sudo apt-get install -y unzip
zip nodejs mongodb-org parallel && sudo apt install -y yarn redis-server git-all && /home/lichess/build/sdkman-init.sh && source "$HOME/.sdkman/bin/sdkman-init.sh" && sdk install java 13.0.1.hs-adpt && sdk install sbt && sudo yarn global add gulp-cli && sudo mkdir -p ~/.parallel && sudo touch ~/.parallel/will-cite && sudo mkdir -p /data/db && sudo chmod 666 /data/db && sudo apt-get autoremove -y && sudo apt-get clean && sudo rm -rf /home/lichess/build' returned a non-zero code: 1
I am running it from lichocker directory and build folder does contain node-init.sh
file.
I am on Windows 10
Just merged a change that might fix this. Please re-open if issues persist.
I had same issue on Windows 10, latest Docker 2.5.01 + WSL2... it was necessary to run dos2unix utility on *.sh files under build/
@mastermind88 's solution worked for me