There is a blog, how to do it with Java Version 11:
https://vaadin.com/blog/how-to-create-a-docker-container-for-a-vaadin-java-app
When i follow this guide and use Java11 for the Application, everything is good.
But when i try to use the same manner for Java17 (the latest LTS), the docker image build is successfull, but the container crashes with a tomcat-server issue:
error log at running container
Did anyone ran the same issue or know how to fix this. The blog-post about dockerize a vaadin app seems to be outdated, and there isn't one out for Java version 17.
To replicate the issue, go to the starter https://start.vaadin.com/app and choose Java 17. Then follow this Blogpost https://vaadin.com/blog/how-to-create-a-docker-container-for-a-vaadin-java-app to dockerize it and replace the openjdk-image version to 17.
Build and then run the container. Appreciate any help.
You can check a box for "Docker config" under Java version in start.vaadin.com to generate a Dockerfile for your app before downloading.
You can then build the container using the docker build . -t myapp:latest command and run it on localhost using docker run -p 8080:8080 myapp:latest
You can also find these instructions and instructions on how to add a Dockerfile to existing Vaadin 23 applications in the Vaadin 23 technical documentation: https://vaadin.com/docs/latest/production/docker
Related
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.
https://www.azerothcore.org/wiki/install-with-docker
On step 4 of the guide I am getting "Service ac-worldserver is not available".
I am unsure how to troubleshoot as I am new to docker.
The answer was to move on and open a seperate terminal. Then run the following command using the worldserver name from docker desktop.
winpty docker attach azerothcore-wotlk-ac-worldserver-1
On Mac, I'm running Lando inside Docker. I'm on Lando v3.0.1 and was running Docker Desktop v2.2.0.5 successfully.
Docker released stable an update v.2.3.0.3 and I installed it. After that I attempted to run Lando, but got a warning message stating the Docker Desktop version is not supported.
So, I'm wondering if it is possible to roll back to my previous Docker Desktop version without uninstalling Docker.
Download your desired version from the Release Notes.
Open the download, drag "Docker" to "Applications"
Chose to "Replace" the existing installation
Run Docker desktop
All your previous containers should still be there.
If you're using Docker Desktop, I found deselecting the option Use Docker Compose V2 fixed my problems. Spent a long time working on reinstalling things. Definitely worth a try before doing anything big.
[Answer 2022]
As said #patricknelson
Sadly, this no longer works. Now it only says "Existing installation is up to date".
And workaround of Docker Descktop downgrade with retains of the data described below:
Get a list of containers
docker container ls
Commit the container to save the data:
docker commit -p 64bf7c9f7122 new-image
where 64bf7c9f7122 - id of my container
new-image - new image name
Save the committed image with changes to the archive
docker save -o c:\backup.tar new-image
Delete current Docker Desktop
Install desired Docker Desktop version
Unpacking the image in docker
docker load -i c:\backup.tar
run container
docker run --name sample-container new-image
Congrats, all data saved and Docker downgraded 😃
So, I run the installer of the previous Docker Desktop version: 2.2.0.5 - got a warning message stating that a newer Docker already exists and if I wanted to replace it (stop, or keep it both). I selected 'Replace'.
The installation went successful.
But when I open Docker all my running containers were gone.
I run lando to recreate my Drupal 7 site.
I got the "Boomshakala" from lando confirming that the app has started up correctly, and provided with its corresponding vitals -including the APPSERVER URLS.
But when I access the URL, I got an error message:
"Error: the website encounter an unexpected error. Please try again later."
The uncaught exception thrown in shutdown function:
"PDOException: SQLSTATE[]: Base table or view not found:1146 Table 'drupal7.semaphore' doesn't exist...."
To solve this, I imported and old copy of the drupal database site:
lando db-import .sql
then I navigated to the docroot folder, and run a database update:
lando drush upddatedb
All good now; thanks #halfer for your comments!
The quick hack here for Lando specifically, is just to reinstall Lando from the installer for the version you want. We've bundled the supported version of Docker Desktop with Lando itself which means you can always specifically install the supported version when installing Lando. This may wipe out your containers and volumes, so be careful!
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.
I'm trying to build and deploy a project from GitHub (the following) using ZEIT Now hosting service using docker.
I followed the instructions in the readme.md of the GitHub project and as soon as i get to the fourth step:
now --public --docker (you might need to login once)
I get the following error:
"> Error! Unknown or unexpected option: --docker"
I installed Docker Toolbox (I'm running Windows 7 x64) and the docker command seems to be working normally in the command prompt, i've used it to identify the docker version i have which is 18.03.0-ce
I'm new to this so sorry if i'm getting anything wrong.
V2 accounts of Now.sh doesn't support Docker deployments.