installing shopware 6 on windows with docker - docker

I am trying to install shopware 6 on a windows 10 machine with docker.
Docker seems to work, if I run: "docker --version" I get:
Docker version 18.09.2, build 6247962
and if I run: "docker run hello-world" I get:
This message shows that your installation appears to be working correctly.
But if I try to run: "psh.phar docker:start" as mentioned in the sw6 Installation guide (https://docs.shopware.com/en/shopware-platform-dev-en/getting-started/installation-guide#docker-installation-recommended) nothing happens.
There is no error or message, just nothing happens.

phar files will require a running php instance on your windows. Try "php -v" to check if your windows can use php. Otherwhise you need to installl it. Running docker native on windows might cause some additional issues, so you might want to run it inside the linux subsystem to avoid those issues.

Related

visual-studio-code : failed to connect. is docker installed?

my environment :
MacOS M1 chip
VSCode version 1.66.2 arm64
local installed docker version : 20.10.22
I have situations that docker is not working in VSCode.
I already installed docker in local. But when I'm trying to connect docker in VSCode, repeatedly asking install docker extensions. (but I do have docker already ). and if I do reinstall with following the VSCode, the docker version was broken (changed to intel chip docker).
Does anybody know what's wrong?
Docker Extensions for VS Code have nothing to do with the Docker engine itself. They are like an additional layer of tools and commands over the installed Docker. E.g. they provide IntelliSense for editing Docker-related files, you can run Docker commands from F1 drop-down, etc. But you should be able to do all the required tasks even without Docker Extensions, e.g. from the Terminal in VS Code, but for this the path to Docker CLI (command line interface) should be added to PATH environment variable.
If you are getting failed to connect error then maybe Docker engine is not running. Please refer to https://docs.docker.com/desktop/install/mac-install/ and https://docs.docker.com/desktop/troubleshoot/overview/ about how to check if the engine is running and how to troubleshoot the issues.
If that doesn't help, please provide some specific error and steps, which led to it, then we'll try to find out.

quorum-dev-quickstart when running in WSL2 got error message: incompatible with Windows

I am following the tutorial on the hyperledger besu Developer Quickstart and I tried running npx quorum-dev-quickstart but always received this error even though I am already using WSL2 with docker installed:
Unfortunately this tool is not compatible with Windows at the moment.
We recommend running it under Windows Subsystem For Linux 2 with Docker Desktop.
Same thing happens when using the Git Bash. Can anyone let me know what I should do differently? Thank you!!
I tried Git Bash, WSL2, PowerShell and none of them worked.

How do you resolve the GitLab error "Error response from daemon: invalid condition: 'not-running'"?

I set up a Windows GitLab runner that's supposed to download a Docker image from our Container Registry and then run a build script in the pipeline. Unfortunately the Docker container never launches due to the following error:
Running with gitlab-runner 15.1.0 (76984217)
on WindowsDockerRunner wZMWQZYi
Resolving secrets
Preparing the "docker-windows" executor
Using Docker executor with image mcr.microsoft.com/windows/servercore:ltsc2019 ...
Pulling docker image mcr.microsoft.com/windows/servercore:ltsc2019 ...
Using docker image sha256:e6b07227af5ca9303c2112b574f6f27f38135bbf9df29d829142410221967401 for mcr.microsoft.com/windows/servercore:ltsc2019 with digest mcr.microsoft.com/windows/servercore#sha256:26c6c296a4737ba478fe3c3e531b098f89b5562c40b416ba6fb8177ac462d1af ...
Preparing environment
Running on RUNNER-WZMWQZYI via
runner2...
ERROR: Job failed (system failure): prepare environment: Error response from daemon: invalid condition: "not-running". Check https://docs.gitlab.com/runner/shells/index.html#shell-profile-loading for more information
The error message doesn't clearly state what the cause of the problem is and the documentation that it references doesn't mention anything about "condition". Based on the link pointing to shell profiles I suspect it might have something to do with the shell that's being run, but when I run the Docker container locally it boots into PowerShell just fine.
Does anyone know how to solve this?
I came across this issue after installing Docker Engine using the Windows Server install script, which fetches docker.exe and dockerd.exe from https://master.dockerproject.org, These builds were last updated in March 2022, I found gitlab-runner 14.9 and earlier work okay with this version (released prior to March 2022), but 14.10 does not (released 2022-04-19) nor do any newer versions.
Installing Docker Desktop resolves this as it provides the latest version. However using Docker Desktop introduces licensing issues. An alternative is to manually install Docker Engine / update the version downloaded by the Microsoft script.
Docker Engine builds are provided on the Moby GitHub project to download from https://download.docker.com/win/static/stable/x86_64/ downloading the lastest version from here and replacing the docker executables in C:\Windows\System32 fixes the problem, working with the latest gitlab-runner.
An alternative is to use the docker-engine chocolatey package (which incidentally I maintain) which provides installation scripting for the above stable builds:
choco install docker-engine
There is also an open issue with the Windows-Containers team to move off (out of date) nightlies: https://github.com/microsoft/Windows-Containers/issues/256 which would provide a stable docker build, through the Microsoft recommended installation method.
Was finally able to solve this issue. We had the Docker Engine installed on our GitLab Runner, but that doesn't seem to be sufficient for GitLab CI/CD. After installing Docker Desktop on the runner the issue disappeared and we were able to run the pipeline.
After some trial and error I got it up and running.
I have another server running the gitlab-runner and docker without any issues (no docker desktop installed, which is not allowed because of licensing stuff).
The server I'm trying to setup right now is a 'redundancy' build server.
So to find out what was my problem, I started switching things from one build server to the other. Currently, it appears that simply downgrading to the gitlab-runner V13.4.0 was enough.
I did reregister the runner, since gitlab stated that the V15.x.x version was using executor "unknown".
Not sure what is going on there, but at least I can continue building now.

Ubuntu Error "The command 'docker' could not be found in this WSL 2 distro."

I'm running WSL 2 on Ubuntu and having some issues getting docker up and running on my computer. I have Docker Desktop installed and running in the background, and I also have WSL integration enabled with Ubuntu.
When I try to run simple docker commands, such as docker --version, I receive this error:
The command 'docker' could not be found in this WSL 2 distro.
We recommend to activate the WSL integration in Docker Desktop
settings.
For details about using Docker Desktop with WSL 2, visit:
https://docs.docker.com/go/wsl2/
I have already visited the link and followed all the instructions it gives, enabling WSL integration with Ubuntu as shown here:
However the error I receive is still the same. Does anyone know how to fix this?
Note: I can run Docker commands (such as docker --version) in PowerShell and Command Prompt, but it is unrecognized in Ubuntu.
"Docker Desktop" should integrate into WSL without additional configuration. Especially, it should not be necessary to append folders to the PATH environment variable.
Of course it must be made sure that "Docker Desktop" as well as the certain WSL distribution are set up for WSL2: In "Docker Desktop" settings "General/Use the WSL2 based engine" must be checked and wsl -l -v should list version 2. If the latter is not true, it can be fixed by wsl --set-version <distribution> 2, where <distribution> is the name from the previous list. Note that "Ubuntu" and "Ubuntu-22.04" (for example) are different.
"Docker Desktop" normally integrates with the default distribution. It can be seen from the asterisk in wsl -l -v which one had been chosen. For me this once was set to "docker-desktop-data" (probably because "Docker Desktop" had been installed earlier than the distribution). The default distribution can be changed by wsl --set-default <distribution>. Furthermore, in "Resources/WSL integration" of "Docker Desktop" settings, the option "Enable integration with my default WSL distro" must be set.
If another distribution than the default one should use docker as well, it needs to be selected explicitely in the list of distributions of "Resources/WSL integration". Press "Refresh" if that other distribution had been installed recently while "Docker Desktop" was already running.
"Integration" means, as far as I can tell, that a link /usr/bin/docker, pointing to /mnt/wsl/docker-desktop/cli-tools/usr/bin/docker, is created automatically. Since /mnt/wsl/docker-desktop/cli-tools/usr/bin/docker seems to be available in all distributions regardless of the integration setting, the presence (or not) of /mnt/wsl/docker-desktop/cli-tools/usr/bin and its content might help to analyse the problem. There should be docker, docker-compose and others:
ls -l /usr/bin/docker
ls -l /mnt/wsl/docker-desktop/cli-tools/usr/bin
I was having this problem, so I went to this docker link (your link is broken) and worked through the suggestions.
This worked for me:
In PowerShell, type wsl -l -v and you should get something like this:
NAME STATE VERSION
* Ubuntu Running 2
docker-desktop Running 2
Ubuntu-20.04 Running 2
docker-desktop-data Running 2
Go into the Docker Desktop Settings -> Resources -> WSL integration.
Select the WSL 2 distro you are using from the above list (e.g. Ubuntu 20.04 in my case) and Apply & Restart.
Now running the version command works as expected in my distribution, and I have all of the functionality required from within the WSL terminal.
:~$ docker -v
Docker version 20.10.16, build aa7e414
Try to put following line in your Ubuntu's ~/.bashrc
PATH+=":/mnt/c/Program Files/Docker/Docker/Resources/bin"
( It might be /c/Program Files/... depending on your mount point. You can check with the command df )
and start a new bash shell, then run docker.
I was able to fix this by taking the below steps but it required some work arounds because I was unable to click-install the necessary WSL2 Linux kernel update after downloading.
Then I had to complete this process.
Then I had go to the PowerShell command line and navigate to the location of the above WSL Update and run the following (in administrator mode-- and not in the Linux command line):
& '.\wsl_update_x64.msi'
That was the only way I could successfully install the update
Then at Powershell command line (in administrator mode-- and not the linux command line), I ran
wsl --set-version Ubuntu 2
per instructions here
Today I had this problem too. In WSL I got a message that I could update WSL from the microsoft store. So I updated WSL and after that moment docker wasn't on my PATH anymore.
It was a lazy saturday morning, so I decided to restart my PC. And magically the problem was "fixed".
Maybe it would be enough to restart WSL distro, at this moment I don't have the time to research whether that would be a good solution.

Docker and Windows 10

I am trying to get an existing docker app running on Windows 10.
Problem 1: When I install the docker toolbox, the Docker Quickstart Terminal is missing
Problem 2: When I run docker build, I get this error ERROR: Windows named pipe error: The system cannot find the file specified. (code: 2)
Any ideas how to solve both errors?
Note: I was on Windows 10 Home - upgrading to Windows 10 pro and will try again
Reset Docker to factory defaults and logging into Docker console, sorted for me.
If you are using version 18.* of docker, try uninstalling it and downgrade to version 17.* (v 17.12.0-ce).
Alternatively, if that does not work and you are running on Windows using Mac with bootcamp and your Windows Virtualization does not seem to get enabled, you can try booting up on Mac OS and then on the explorer window go to File>Restart to restart the system back to Windows. This will somehow fix the Windows Virtualization setting back to Enabled.
You need to connect the terminal you are using to the Docker deamon:
If you have bash installed, you can run:
eval $(docker-machine env default)
Otherwise from windows cmd, you can run
docker-machine.exe env --shell cmd default
#FĂ©lix Gagnon-Grenier - Windows 10 has a linux layer available - you can run bash in a powershell window, if you've got a certain upgrade to Windows 10 Pro.
Upgrading to Windows 10 Pro and re-installing docker did the trick

Resources