Unable to launch the Jenkins console which is running on Linux box - linux

I just pulled the Jenkins image from docker hub by using below command.
sudo docker pull jenkins
sudo docker run -p 7071:7071 -p 50000:50000 jenkins this command help me to run the jenkins image inside the docker container
Now the problem is that I just want to run the Jenkins console to create a some sample test jobs. When I tried to access this from some windows machine I'm not able to connect and It returned 404 error code.
Tried to connect the Jenkins from Windows machine.
http://<ip address>:7071 -> this is failing to connect.
http://<ip address>:50000 -> This returning the Jenkins Agent Protocol details
Output:
Jenkins-Agent-Protocols: JNLP-connect, JNLP2-connect, JNLP4-connect,
Ping Jenkins-Version: 2.60.3 Jenkins-Session: cba34bd8 Client:
XXXXXXXX Server: YYYYYYYY
Can someone help me since I'm new to docker + jenkins world and want to know how to connect the dockerized jenkins that is hosted in the Linux box.
Thanks in advance.

The main port used by Jenkins for access via the web console is 8080 and so add:
docker run ... -p 8080:8080

Related

Running Splash on Docker Toolbox with Windows 10

I am trying to install and run splash on using Windows 10 Home. I have installed docker toolbox, as on windows 10 Home you can't install docker. Then in command prompt when I type
docker pull scrapinghub/splash
I get the error
error during connect: Post http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.40/images/create?fromImage=scrapinghub%2Fsplash&tag=latest: open //./pipe/docker_engine: The system cannot find the file specified. In the default daemon configuration on Windows, the docker client must be run elevated to connect. This error may also indicate that the docker daemon is not running.
One interesting thing I noticed was that if I run Docker Quickstart Terminal I can install splash with the command
docker pull scrapinghub/splash
and then using the command
docker run -p 5023:5023 -p 8050:8050 -p 8051:8051 scrapinghub/splash
it gives me
server listening on http://0.0.0.0:8050
But then when I paste http://0.0.0.0:8050 into Chrome it gives me "This site can't be reached."
Thanks
So 1st error clearly says that your Docker container is not running, so your pull command fails
You can check by running any docker command maybe try this
docker --version
For your 2nd query, you need to use Docker IP, to access the application
You can try docker-machine ip to see, on what IP docker is running (Assuming docker-machine is installed)
Generally, on windows Docker IP is 192.168.99.100
Try these 2
192.168.99.100:8050
or
localhost:8050

How to access docker mediawiki from another machine on the network?

I'm a complete newcomer to docker (and also a Linux novice). I've just installed docker and mediawiki on a Lubuntu 16.10 VM running on an ESXi 6.5 host. I followed guidance here
https://github.com/addshore/mediawiki-docker-dev
I have mediawiki up and running on the Lubuntu VM, and can access it using:
http://default.web.mw.localhost:8080
I'd like to access mediawiki from another machine on the LAN, but don't know where to start. I've tried this command:
sudo docker run -d -p 8080:8080 apache
but got this error:
Unable to find image 'apache:latest' locally
docker: Error response from daemon: pull access denied for apache, repository does not exist or may require 'docker login'.
Is there a simple way of getting access to my docker/mediawiki site from another machine?
As the error says... apache is not an image name
MediaWiki has an official docker image... And you should not use sudo to run containers
docker run --name some-mediawiki -p 8080:80 -d mediawiki

Cannot access server in docker container

I started a docker image using
docker run --interactive --tty node_web_1
And the running server inside the container successfully prints
Running on http://localhost:8080
in the console. I have exposed port 8080 in the Dockerfile. So in my understanding, when I call http://localhost:8080 in the browser in windows, I should access the server in the container, right? I get no reply though....
How do I go about finding the error? I executed the command
docker-machine ls
as suggested here How to access Docker container's web server from host but apparently I have no docker-machines running? What are those machines? Do I need them? I have only docker for windows installed, no additionall packages or shells.
try to publish your port
docker run -p 8080:8080 -it node_web_1

Gitlab registry...unable to login not running?

Followed the gitlab-registry guide to get it running (and enabled to project)
I know the HTTPS works fine (TLS via letsencrypt) because when i login to my gitlab, it successfully redirects to https.
when attempting to login to docker however:
docker login (my domain)
i am getting:
Cannot connect to the Docker daemon. Is the docker daemon running on this host?
netstat -tulpn shows that registry running on 4567
but completely unable to connect to it
You need to have docker installed on the machine you are running docker login from. And if it's installed, you need to be root or in the docker group.

How to forward eclipse in a docker container through a linux proxy?

I have an Eclipse instance running on linux Ubuntu in a docker container. This container runs on a CentOS host with no physical display and I would like to forward X11 from the docker container to my laptop (running windows) through the CentOS host.
Docker container runs with
docker run --name docker-eclipse -p 5000:5000/tcp -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix
While I can forward X11 from the host to my laptp with no problems, I'm not able to start eclipse inside the container, because it dies with "Cannot open display:".
What I'd like is
laptop --> remote host --> docker container running eclipse
What is the best way to do that?
This might work (server is assumed to be the remote host running Docker, laptop is assumed to be the local host from which you want the GUI):
Connect to the server.
Mount through sshfs the laptop's .X11 socket from the server: user#server:$sshfs laptop:/tmp/.X11-unix /tmp/.X11-unix.
Start the container with something like user#laptop:ssh -X server docker run --name docker-eclipse -p 5000:5000/tcp -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix.
I'm not sure this would work, and it does not feel the cleanest way of doing so, but what you want to perform is quite.... unusual (though it would be something really great !!).
Comment your feedback !

Resources