I' m getting an error in the deploy stage, this is the output:
======CMD======
docker stop $(docker ps -a -q)
docker login docker.pkg.github.com -u $GITHUB_USERNAME -p $GITHUB_TOKEN
docker pull docker.pkg.github.com/fredomontero/bones/bones:latest
docker run -dit -p 3001:80 docker.pkg.github.com/fredomontero/bones/bones:latest
======END======
err: bash: line 2: docker: command not found
err: bash: line 2: docker: command not found
err: bash: line 3: docker: command not found
err: bash: line 4: docker: command not found
Hi Remy, thanks for answering I already solved, the issue was that I installed docker using snap, and reading on the web I realized that snap installs everything under /snap and that is not part of the environment variable PATH.
it was a little tricky because if I ssh from my local computer to the server and then run docker it works, but it didn't work from the yml file.
so instead of running docker I had to run /snap/bin/docker
or create a symlink:
sudo ln -s /snap/bin/docker /usr/bin/docker
Thank for this post bro it's very helpful!
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
I' m getting an error in the deploy stage, this is the output:
does anybody knows what' s wrong?
Hi Christian, can you check if you have docker installed on your production server?
Hi Remy, thanks for answering I already solved, the issue was that I installed docker using snap, and reading on the web I realized that snap installs everything under /snap and that is not part of the environment variable PATH.
it was a little tricky because if I ssh from my local computer to the server and then run docker it works, but it didn't work from the yml file.
so instead of running docker I had to run /snap/bin/docker
or create a symlink:
Thank for this post bro it's very helpful!