Can't create a remote interpreter with Docker-compose - docker

Hello guys i need your help!
I can't configure the remote docker-compose interpreter in PyCharm, I keep getting the following error:
and the corresponding log entry:
2020-08-09 02:45:55,299 [6304130] WARN -
ckaging.InstalledPackagesPanel - The following command was executed:
C:\Program Files\JetBrains\PyCharm 2020.1.3\bin\runnerw64.exe
C:\Users\Angel\Downloads\docker-compose-Windows-x86_64.exe -f
D:\Archiv\Projects\PycharmProjects\django_with_db\docker-compose.yml
-f C:\Users\Angel\AppData\Local\JetBrains\PyCharm2020.2\tmp\docker-compose.override.241.yml
run --rm --no-deps web
The exit code: 1
The error output of the command:
Couldn't find docker binary. You might need to install Docker:
https://docs.docker.com/engine/installation/windows/
docker-compose finished with exit code 1
In my case, PyCharm is installed on Windows 10, and Docker and Docker-compose are on a separate server running CentOS and I use the following settings:
Docker:
Interpreter:
At the same time, Docker as a remote interpreter works fine, the problem only concerns the docker-compose.
I don't know if this matter or not, but I want to point out, that since Docker is not installed on a windows host, when I first tried to create a remote interpreter using docker-compose, PyCharm showed a message – can’t find the docker-compose executable. To overcome this, I downloaded the executable for my platform from the official Docker repository and manually specify the path to it:
Whether this is the right solution I don't know, but it's works
I am using the following software versions:
Windows 10 build 19041
PyCharm Professional 2020.2
CentOS Linux release 8.2.2004
Docker version 19.03.12, build 48a66213fe
docker-compose version 1.26.2, build eefe0d31

Related

When i run docker-compose on windows 11, i've an error 'docker: 'compose' is not a docker command.', despite that docker-compose is installed

i installed docker desktop on windows 11, following instruction here : docs.docker. I can run dockercommand but when i run docker-compose or docker compose i got the following error :
docker: 'compose' is not a docker command.
I can see the executables are installed correctly when i type :
where docker compose
// C:\Program Files\Docker\Docker\resources\bin\docker-compose
C:\Program Files\Docker\Docker\resources\bin\docker-compose.exe
where docker
// C:\Program Files\Docker\Docker\resources\bin\docker
C:\Program Files\Docker\Docker\resources\bin\docker.exe
I'm using git bash on Windows 11.
I'm expecting to read a docker-compose.yml file on a project by running docker-compose up.
I uninstall docker, then i restarted the computer and installed it again. And this time, instead of skipping the tutorial (quick start guide), i did it and everything worked fine.

error during connect: This error may indicate that the docker daemon is not running in cmd

I am a beginner at Docker. I need to create two containers for mongo and mongo-express. But, I'm getting an error as error during connect: This error may indicate that the docker daemon is not running.
Then I tried below steps:
I run the cmd as administrator. Then I run the command "C:\Program Files\Docker\Docker\DockerCli.exe" -SwitchDaemon. It didn't work for me. then I tried with 'C:\Program Files\Docker\Docker\DockerCli.exe' -SwitchDaemon way. Then I enabled hypervisor also. Still, I am getting the same error. When I ran the docker version command in cmd I received the below-mentioned outputs:
Then after I tried with cd "C:\Program Files\Docker\Docker" and ./DockerCli.exe -SwitchDaemon separately.
docker info command gives below mentioned error:
C:\Windows\system32>docker info
Client:
Context: default
Debug Mode: false
Plugins:
buildx: Docker Buildx (Docker Inc., v0.10.0)
compose: Docker Compose (Docker Inc., v2.15.1)
dev: Docker Dev Environments (Docker Inc., v0.0.5)
extension: Manages Docker extensions (Docker Inc., v0.2.17)
sbom: View the packaged-based Software Bill Of Materials (SBOM) for an image (Anchore Inc., 0.6.0)
scan: Docker Scan (Docker Inc., v0.23.0)
Server:
ERROR: error during connect: In the default daemon configuration on Windows, the docker client must be run with elevated privileges to connect.: Get "http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.24/info": open //./pipe/docker_engine: The system cannot find the file specified.
errors pretty printing info
Did you install the Docker Desktop on your Windows PC? If not please install it and Run it. If you already installed it, please run it first!
Then you can see whether the docker engine is starting or not!
After the docker engine started check whether this error is still there. Most probably error will fix after doing that!
If the docker engine is not started, please uninstall docker and delete everything from Registry.
Press Win+R and %appdata%\Docker to go and delete all the files.
Then reinstall the docker, if better you can install the docker desktop. Because with the docker desktop, the docker provides a whole bundle with it! Then you will be able to install the docker for windows smoothly.
Because this error usually getting when the docker engine is not started. Also, this may happen missing Linux kernel on windows. Both issues will address with the correct installation of the Docker Desktop.
You can check whether you have a docker Linux subsystem running on your windows pc by running the following command on cmd,
wsl -l
If you get a result like this,
C:\Users\gayan>wsl -l
Windows Subsystem for Linux Distributions:
docker-desktop-data (Default)
docker-desktop
Then you are okay and ready to go.
If not, please try to uninstall and install the docker desktop
Make sure you delete the previous registry, To do that press Win+R and type Regedit Then go to HKEY_LOCAL_MACHINE -> SOFTWARE -> Docker Inc and delete that folder.
If still you are getting the same error, try to troubleshoot the docker desktop. you can refer to the docker documentation.

"docker: 'compose' is not a docker command" when running docker compose

After installing the latest version of Docker Desktop on my M1 Mac pro, I can't seem to run docker compose despite having all the correct files installed.
I've tried running docker-compose and docker compose in my terminal and I get this message: docker: 'compose' is not a docker command.
After running docker --version, I'm currently on Docker version 20.10.21, build baeda1f
Compose is correctly added to my PATH vars under /usr/local/bin/, which has the following files:
com.docker.cli docker-credential-desktop fuzzy_match kubectl.docker
docker docker-credential-ecr-login httpclient vpnkit
docker-compose docker-credential-osxkeychain hub-tool xcodeproj
docker-compose-v1 docker-index kubectl
When I run which docker-compose, it returns /usr/local/bin/docker-compose so it seems like everything is configured correctly.
Also running docker-compose-v1 does seem to work for some weird reason.
Any ideas?
Edit: Seems like this was fixed after installing the newest version of Docker (Docker Desktop 4.14.1 (91661), Docker version 20.10.21, build baeda1f).
Install Rosetta 2 with softwareupdate --install-rosetta, then uncheck Use Docker Compose V2 in Docker Dashboard -> Settings -> General.

IOTA "one-click-tangle" via docker linux containers - ERROR 1

I am trying to run a private tangle on my computer through linux docker containers.
Therefore I followed the guide over at https://wiki.iota.org/chrysalis-docs/tutorials/one_click_private_tangle
Every step succeeded up until we tried to execute
./private_tangle.sh install
This reports
Error 1
as seen in the screenshot below:
We do net get any further information, is anyone familiar with this error, or has any clue how to get some more information on the error so that we can at least have a clue where to look?
Some further information:
After executing docker ps -a we see that not a single container is running.
I am running on a windows 10 machine
I execute the commands from within ubuntu (version 20.04)
Ubuntu, docker-desktop and docker-desktop-data are all running WSL2
Docker integration with ubuntu is activated
I thought the error could maybe come from no hornet node initially being installed, so I installed a hornet node successfully, according the guide that https://wiki.iota.org/chrysalis-docs/tutorials/one_click_private_tangle. This changed nothing to the Error.
The version of docker and docker-compose are compliant with the requirements
If any more details are needed to help me solve this problem, please let me know.
I used the documentation (https://wiki.iota.org/chrysalis-docs/tutorials/one_click_private_tangle) to install these containers on my local ubuntu 18.04.
My docker version is: 20.10.12
And docker-compose version is: 1.29.2
By following the steps of the tutorial I managed to successfully start all of the containers without trouble.
My guess here would be that the permission of the 'private-tangle.sh' are not correct or that there is permission problem on the docker level.
You should start with checking the permission level of the private-tangle.sh script by using $ls -l
Here is my output -rwxrwxr-x 1 ben ben 9413 Jan 11 11:28 private-tangle.sh
It could also be due to the docker rights if you have to use sudo when executing a docker command it will give some troubles when executing the script.
You need to add yourself to a docker group to be able to run docker commands without sudo. You can do this by running sudo usermod -aG docker $USER with damiaan-vh as $user.
Solution from source https://stackoverflow.com/posts/70665394/edit
Suggesting to downgrade ubuntu version to 18.04 for more stable version.
For reinstalling the docker and docker-compose programs follow this documentations
(docker: https://docs.docker.com/engine/install/ubuntu/ )
(docker-compose: https://docs.docker.com/compose/install/ )

Gitlab-runner + Docker + Windows - Invalid volume specification

I'm trying to run my Gitlab CI locally using Gitlab-runner and docker before committing to make sure they work okay. But I'm having some strange issues!
Unfortunately I have no choice but to use windows (I've had success in the past on Linux).
Every time I run a job in powershell:
C:/Gitlab-runner/gitlab-runner exec docker npm
I get an error:
Job failed (system failure): Error response from daemon: invalid volume specification: '/host_mnt/c/builds/project-0/Users/Lewsmith/api:C:/Users/Lewsmith/api:ro' (executor_docker.go:921:0s)
I've tried setting docker volumes (nemerous combinations) and builds-dir:
C:/Gitlab-runner/gitlab-runner exec docker --builds-dir /builds --docker-privileged --docker-volumes "/builds:C:/Gitlab-runner/builds" npm
That fails with Error response from daemon: invalid mode: /Gitlab-runner/builds because of the colon after the C..
Can anyone point me in the right direction as I'm stumped?
Using gitlab-runner version 11.5.0
Docker is not fully supported by GitLab Runner on Windows yet.
The workaround is to use Windows Subsystem for Linux and install gitlab-runner there:
curl -L https://packages.gitlab.com/install/repositories/runner/gitlab-runner/script.deb.sh | sudo bash
sudo apt-get install gitlab-runner
gitlab-runner exec docker build
At the moment there isn't official support for the Docker executor in Windows. A work in progress issue is open at the moment, and it looks like some people have managed to get a windows docker executor working to varying success in that merge request.
This specific comment shows how they've managed to get it setup using a custom built gitlab-runner. I'm unsure how this will work with Services however, so YMMV.

Resources