I have tried to setup a docker image with Jenkins installed - I used the wizard, and got the initial password entered, and installed the recommended plugins - After that, I only get an blank page when I connecto to the localhost:8080 page
Jenkins inital page
If I connect to something like localhost:8080/configure The page works fine, but the inital page doesn't - The tab is called "SetupWizard" in firefox - What can I do?
It happened to me after the initial installation, in the fisrt time starting.
Restart the jenkins instance by
http://jenkins.server/restart
and after that the home page should be working.
A click on browser's "back button" sent me to
the working page: /login?from=%2F ....
historical:
A non docker-image-related answer can be found here
It suggests a firewall setting.
But is such a setting modification possible
on the official jenkins docker image (jenkins/jenkins lts)
using the provided jenkins user with no root access ?
(I personaly started the docker image ussing this command:
docker run -p 8080:8080 -v /var/run/docker.sock:/var/run/docker.sock --name jenkins --hostname jenkins --add-host ns375278:172.17.0.1 -e JENKINS_OPTS="--prefix=/jenkins" -e JENKINS_ARGS="--prefix=/jenkins" --env "JAVA_OPTS=-Dhudson.footerURL=https://myDnsName.com" jenkins/jenkins:tls
Related
I'm a newbie with docker, today I'm trying to start my docker container with keycloak without success, I haven't made any change to the container and it just doesn't want to start up.
Here is the docker log error:
*** JBossAS process (188) received TERM signal ***
User with username 'admin' already added to '/opt/jboss/keycloak/standalone/configuration/keycloak-add-user.json'
The container is not inside any volume, and it was created using the command
docker run -p 8080:8080 -e KEYCLOAK_ADMIN=admin -e KEYCLOAK_ADMIN_PASSWORD=admin quay.io/keycloak/keycloak:16.1.0
I tried it as well and the user account was not created. I believe that is as a result of the fact that the default 16.x.x and below are all based on wildfly and not quarkus. The new quarkus version supports these environment variables for setting up the initial admin user and is the .x preview version from 16.x.x and below.
It is only from 17.x.x onwards that quarkus is fully supported in the default version and is no longer a .x preview version. Link here
I tested this hypothesis by running the same command but only changing the version of keycloak to 17.x.x and adding the state the server should run in and that run fine. The documentation for this is here
docker run -p 8080:8080 -e KEYCLOAK_ADMIN=admin -e KEYCLOAK_ADMIN_PASSWORD=admin quay.io/keycloak/keycloak:17.0.0 start-dev
Also note that the admin login is now at http://localhost:8080/admin instead of http://localhost:8080/auth in the new version.
I am trying to create a new job in Jenkins (docker) latest version 2.309. Even after giving 'item name' and type of project as 'freestyle', the 'OK' button is disabled as shown in the attached screenshot. I have all permissions in place, moreover I am running Jenkins as admin. I have used docker volumes to store data.
docker run -u 1000 --name jenkins_test --restart=on-failure:10 -d -v jenkins_logs:/var/log/jenkins_test -v jenkins_data:/var/jenkins_test -v /dev/urandom:/dev/random -v /var/run/docker.sock:/var/run/docker.sock -p 9080:8080 jenkins/jenkins
This question is similar to this, however if you see the screenshot you'll see a symbol ">>" without any message. Also I tried all suggestions provided, no luck. Please help me out.
#Rajib Deka, yes, its was the issue with reverse proxy configuration in our case.
for checkjobname., it was injecting java script code, may be mimetype changed in latest jenkins version. it was not happening at least until old versions 2.249.2
I am trying to create a rabbitmq docker container with default user and password but when I try to enter to the management plugin those credentials doesn't work
This is how I create the container:
docker run -d -P --hostname rabbit -p 5009:5672 -p 5010:15672 --name rabbitmq -e RABBITMQ_DEFAULT_USER=user -e RABBITMQ_DEFAULT_PASS=pass -v /home/desarrollo/rabbitmq/data:/var/lib/rabbitmq rabbitmq:3.6.10-management
What am I doing wrong?,
Thanks in advance
The default user is created only if the database does not exist. Therefore the environment variables have no effect if the volume already exists.
I had the same problem when trying to access in Chrome. Firefox worked fine. The culprit turned out to be a deprecated JS method that was no longer allowed by Chrome.
I am using Jenkins (2.32.2) Docker container with the Publish over ssh plugin (1.17) and I have added a new server manually.
The newly added server is another Docker container (both running with docker-compose) and I am using a password to connect to it, and everything works just fine when doing it manually, but the problem is when I'm rebuilding the image.
I am already using a volume for the jenkins gone directory and it works just fine. The problem is only on the initial installation (e.g. image build, not a container restart).
It seems like the problem is with the secret key, and I found out that I also need to copy some keys when creating my image.
See the credentials section at Publish over ssh documentation
I tried to copy all the "secrets" directory and the following files: secret.key, secret.key.not-so-secret, identity.key.enc - but I still can't connect after a fresh install.
What am I missing?
Edited:
I just tried to copy the whole jenkins_home directory on my DOCKERFILE and it works, so I guess that the problem is with the first load or something? maybe Jenkins changes the key / salt on the first load?
Thanks.
try to push out jenkins config to docker host of to os where docker host is being installed
docker run --name myjenkins -p 8080:8080 -p 50000:50000 -v /var/jenkins_home jenkins
or
docker run --name myjenkins -p 8080:8080 -p 50000:50000 -v ./local/conf:/var/jenkins_home jenkins
I have a server running Gitlab. Let's say that the address is https://gitlab.mydomain.com.
Now what I want to achieve is to install a Continuous Integration system. Being that I am using Gitlab, I opt for Gitlab CI, as it feels the more natural way to go. So I go to the Docker repo and I found this image.
So I run the image to create a container with the following
docker run --restart=always -d -p 9000:9000 -e GITLAB_URLS="https://gitlab.mydomain.com" anapsix/gitlab-ci
I give it a minute to boot up and I can now access to the CI through the URL http://gitlab.mydomain.com:9000. So far so good.
I log in the CI and I am greeted by this message:
Now you need Runners to process your builds.
So I come back to the Docker Hub and I find this other image. Apparently to boot up this image I have to do it interactively. I follow the instructions and it will create configuration files:
mkdir -p /opt/gitlab-ci-runner
docker run --name gitlab-ci-runner -it --rm -v /opt/gitlab-ci-runner:/home/gitlab_ci_runner/data sameersbn/gitlab-ci-runner:5.0.0-1 app:setup
The interactive setup will ask me for the proper data that it needs:
Please enter the gitlab-ci coordinator URL (e.g. http://gitlab-ci.org:3000/ )
http://gitlab.mydomain.com:9000/
Please enter the gitlab-ci token for this runner:
12345678901234567890
Registering runner with registration token: 12345678901234567890, url: http://gitlab.mydomain.com:9000/.
Runner token: aaaaaabbbbbbcccccccdddddd
Runner registered successfully. Feel free to start it!
I go to http://gitlab.mydomain:9000/admin/runners, and hooray, the runner appears on stage.
All seems like to work great, but here comes the problem:
If I restart the machine, due to an update or whatever reason, the runner is not there anymore. I could maybe add --restart=always to the command when I run the image of the runner, but this would be problematic because:
The setup is interactive, so the token to register runners have to be input manually
Every time the container with Gitlab CI is re-run the token to register new runners is different.
How could I solve this problem?
I have a way of pointing you in the right direction but im trying to make it myself, hope we both manage to get it up heres my situation.
im using coreOS + docker trying to do exactly what youre trying to do, and in coreOS you can setup a service that starts the CI everytime you restart the machine (as well as gitlab and the others) my problem is trying to make that same installation automatic.
after some digging i found this: https://registry.hub.docker.com/u/ubergarm/gitlab-ci-runner/
in this documentation they state that they can do it in 2 ways:
1-Mount in a .dockercfg file containing credentials into the /root
directory
2-start your container with this info:
-e CI_SERVER_URL=https://my.ciserver.com \
-e REGISTRATION_TOKEN=12345678901234567890 \
Meaning you can setup to auto start the CI with your configs, ive been trying this for 2 days if you manage to do it tell me how =(