Cannot Build Docker - Latest Version
See original GitHub issue- Version (
cloudcmd -v
): - Node Version
node -v
: - OS (
uname -a
on Linux): - Browser name/version:
- Used Command Line Parameters:
- Changed Config:
Hi,
I cloning Cloudcmd in order to make the css edits, per issue https://github.com/coderaiser/cloudcmd/discussions/361.
I am trying to build a new Docker Hub repo with my edits but I am having problems. I have tried both the standard Dockerfile and the Dockerfile-alpine.
FIRST ATTEMPT:
In my terminal, I cd to the “docker” folder and I run:
docker build --no-cache -t cloudcommander .
I get the below error message:
failed to compute cache key: "/package.json" not found: not found
So I copied package.json to to the “docker” folder and ran docker build again. I get a bunch of npm deprecated warnings; and the build completes without errors.
I then go to terminal and I type:
docker run -dp 8000 cloudcommander
I get the below error:
docker: Error response from daemon: OCI runtime create failed: container_linux.go:380: starting container process caused: exec: "/usr/src/app/bin/cloudcmd.mjs": stat /usr/src/app/bin/cloudcmd.mjs: no such file or directory: unknown.
No luck so I try the Second Attempt
SECOND ATTEMPT: I copy the Dockerfile to the root of the repo. I then cd to the root of the repo and run the docker build command.
The build finishes without errors. Then I run:
docker run -dp 8000 cloudcommander
The container then appears in Docker Desktop, but turned off. When I click on the docker it shows this as the error:
/usr/bin/env: 'node\r': No such file or directory
THIRD ATTEMPT
Next I renamed the Dockerfile.alpine
to Dockerfile
and copied to the root of the repo. I ran the docker build
and docker run
without errors. On Docker Desktop I get the same error above.
I tried the same with the Alpine Dockerfile in the /docker folder and when going to Docker Desktop, I get this error message:
Error invoking remote method 'docker-start-container': Error: (HTTP code 400) unexpected - OCI runtime create failed: container_linux.go:380: starting container process caused: exec: "/usr/src/app/bin/cloudcmd.mjs": stat /usr/src/app/bin/cloudcmd.mjs: no such file or directory: unknown
I am not sure what I am doing wrong to build the docker.
Any advise?
Thank you.
H.
Issue Analytics
- State:
- Created 2 years ago
- Comments:7 (4 by maintainers)
Top GitHub Comments
@coderaiser and @timoknapp this worked like a charm guys. Thank you for all the help. I will be adding some comments to a previous thread in Discussion.
Thanks again.
Hi @hernandito ,
Before building the Docker images, you have to build the project at first. In order to do this you need to execute the following commands:
I hope this helps you out.