PyCharm doesn't let me add remote interpreter - docker

I have problem with docker compose remote interpreter in PyChart. I'm using docker compose v2, PyCharm 2021.2.3 and macOS Monterey version 12.0.1.
docker compose version
# Docker Compose version v2.1.1
When I want to add new remote interpreter, I always got same error config.registryAddress must not be null. Googling shows that it can be local docker registry, but I don't have any, only private on cloud and I'm logged in there. I can pull images and all that stuff. I've tried docker compose up in terminal and it works as usual. What am I doing wrong?

Related

Cant see any containers, nor images, while many are running in VS Code - docker extension

I have logged into my docker hub account, run docker compose up, which had downloded all necessary images, run them and now everything is up and running. Yet, I do not see any of those mentioned in the title.
Likewise:
No networks, neither volumes visible - yet I have several up and running..
Looks like it can't connect to the active docker daemon ??
I also can not pull image from a docker hub (choosing from the extension menu): "Process exited with code 1"
However:
I do see everything correctly in the registries pane...
Extension version: 1.23.3
VS Code version: Code 1.74.3 (97dec172d3256f8ca4bfb2143f3f76b503ca0534, 2023-01-09T16:57:40.428Z)
OS version: Linux x64 5.4.0-137-generic snap
Sandboxed: No

Docker compose unsupported option 'target'

I am developing a nest js application and I need to deploy it to a remote server with ubuntu, i'm new with docker and everything is fine on windows 8 and ubuntu 22 i can use my app fine but on server i get this error
enter image description here error in the server
in using this docker files
enter image description here Dockerfile
enter image description here docker-compose
On my windows and ubuntu works docker-compose up dev and docker-compose up prod. It seems weird that it works on two different systems but not on the server, they all have the same version of docker and docker-compose
I try to change the version in the yml, but the error persists.

"Error decompressing python39.dll" when executing docker-compose

I had some issues executing docker-compose commands lately. In my observation, this happens after my Docker installation was upgraded. And before it was upgraded, I had no issues executing it. I am using Visual Studio and Windows 10. Docker version is: Docker version 20.10.10, build b485636
Would greatly appreciate anyone's help. Here is the error:
[20120] Error -5 from inflate: (null)
[20120] Error decompressing python39.dll
Update: After some initial searching, I came across about Docker Compose v2 and it states that:
Compose V2 and the new docker compose command
Important
The new Compose V2, which supports the compose command as part of the
Docker CLI, is now available.
Compose V2 integrates compose functions into the Docker platform,
continuing to support most of the previous docker-compose features and
flags. You can test the Compose V2 by simply replacing the dash (-)
with a space, and by running docker compose, instead of
docker-compose.
Starting with Docker Desktop 3.4.0, you can run Compose V2 commands
without modifying your invocations, by enabling the drop-in
replacement of the previous docker-compose with the new command. See
the section Installing Compose V2 for detailed instructions how to
enable the drop-in replacement.
So yeah, I tried executing using "docker compose" without the dash (-) in between docker and compose and it works..

Docker device path differs depending on commands

After recent Docker update (Docker Desktop for Mac) my stack broke.
I'm using my docker-compose config in two ways - with up command and with run command to execute some operations via containers (when it's not up yet).
I'm getting error:
ERROR: Configuration for volume my_code specifies "device" driver_opt /Users/me/Projects/project/backend/my_code, but a volume with the same name uses a different "device" driver_opt (/host_mnt/Users/me/Projects/project/backend/my_code). If you wish to use the new configuration, please remove the existing volume "my_code" first:
I have configured docker-compose with volumes shared between containers.
volumes:
my_code:
driver: local
driver_opts:
type: none
device: ${PWD}/project/backend/my_code
o: bind
Looks like for some reason up and run commands get's different path from $PWD in docker-compose. One get's prefixed with /host_mnt and the other doesn't. Is this a bug or maybe my config is invalid?
Docker for Mac 2.4.0.0 stable
Docker Compose 1.27.4
Catalina
I just had the same issue with the prefix /host_mnt on a Ubuntu system.
This is something related to Docker Desktop.
The solution for me was to uninstall docker and Docker desktop according to the documentation
https://docs.docker.com/desktop/install/ubuntu/
https://docs.docker.com/engine/install/ubuntu/
And afterwards also delete the docker config files manually.
rm -rf ~/.docker
Then I just installed the docker engine instead of the docker desktop.
The problem was caused by an update on Docker Desktop that adds that /host_mnt prefix for compatibility with Windows users.

Docker-compose can't find suitable file, even though it exists

So I am running ubuntu 18.04 lts on windows 10 through hyper-v and I'm trying to run the docker compose command through the terminal. When inside the docker folder and I run ls, it says there is a docker-compose.yml file. Still when I run docker compose command, it says no suitable configuration file is found.
docker-compose up -d
ERROR:
Can't find a suitable configuration file in this directory or any
parent. Are you in the right directory?
Supported filenames: docker-compose.yml, docker-compose.yaml
I'm using docker version 18.09.0 and docker compose version 1.22.0
On Ubuntu Ubuntu 18.04.2 LTS I was facing the same issue. I don't know the exact reason but Docker and Docker Compose installed with snap was not working.
sudo snap remove docker && sudo snap remove docker-compose
Installed docker from Officials Docs here and compose from here via apt and and now my Docker Compose file start working
Found out the problem was using shared folder functionality with Hyper V and windows 10. For some reason docker won't work when the docker-compose.yml file is located inside that, however when I move it outside of the shared(e.g. home directory) folder it does work. So if I want to use the docker file I have to place it outside the shared folder to make it work. Rest of the project runs as expected, so a little workaround ......
Was getting the same error on Ubuntu 20.04. I could not use apt to install docker-compose (Forbidden errors on apt's sources.list and out of my control) so had to install docker-compose with snap
sudo snap install docker
That is a "caveat" of docker installed with snap. From docker-snap README: "All files that docker needs access to should live within your $HOME folder". So that is expected behavior.
Move your project to $HOME folder. For example, I had my project in /usr/local/src/my_project and had to move to ~/some_folder/my_project and then could run docker-compose.
It will be a bit stupid answer I believe but as I am new to using docker desktop on windows. I was trying to run a script file using Ubuntu distro 20.04 LTS. the path I was providing was not correct. because windows user will use path like this in my case C:\Users\usera\Desktop\Terminology-service\ols but here when I changed it to /mnt/c/Users/usera/Desktop/Terminology-service/ols it worked.

Resources