permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get "http://%2Fvar%2Frun%2Fdocker.sock/v1.24/containers/json": dial unix /var/run/docker.sock: connect: permission denied
- answer: before any docker-command type sudo. For example: "sudo docker build ...; sudo docker run -it"
Forget to stop docker-container
- answer: close the container after all work
docker stop <container_id>Clone the project
git clone https://github.com/Sem4kok/pc-clubGo to the project directory
cd pc-clubYou can run the application from here
go run main.go <path/to/test/file>docker imaging
docker build -t pc-club .docker container launch
docker run -it pc-club inside the container, use to run my tests
./task tests/<choose any my test>- Do not close the container.
- Open a second terminal on your host machine
- Type
docker psyou need to copy the id of the running container (in this case 7e50d0f30bc0)
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
7e50d0f30bc0 yadro-club "bash" 3 minutes ago Up 3 minutes reverent_hermann
copy the file you need into a docker container
docker cp <path/to/test_file> 7e50d0f30bc0:/app/go to the terminal where the container is open. run the desired file using
./task <copied_file>- Telegram: @peso69
- e-mail: w1usis@mail.ru