This may seem like duplicate question? But I think it's not, and also. I have tried google.
This is the situation, I want to build a CI pipeline with Gogs and Drone, with their nice documents, I have build it up. But now, I am stucking on: How to copy files from container to the host in the container. below is my drone yml config.
pipeline:
build:
image: node:7
commands:
- cd client
- npm config set registry https://registry.npm.taobao.org
- npm install --no-optional
- yarn run build
- sudo docker cp $(sudo docker ps -alq):$PWD/build /var/www/react/
The CI ends with error:
/bin/sh: sudo: not found
after try without sudo, error continues:
/bin/sh: docker: not found
The answers I found are all about copy files to host from container which the shell runs in host computer. but now the commands I tried to run is in the container, so What should i do? or I miss something.