Docker windows 10 with gitlab - docker

Good afternoon,
I have a doubt.
My Operating System is Windows 10, I have docker installed on it and would like to by the ubuntu with gitlab.
It is possible? I tried to do this but I had a problem communicating. I have seen in some places that it does not have support.

On Windows 10 with docker, you can start the omnibus gitlab version.
Pull the image and run it with these arguments :
docker run --detach --hostname HOSTNAME --publish 443:443 --publish 80:80 --name gitlab --restart always gitlab/gitlab-ce:latest

Related

Access Gitlab container via https

I had a Docker container created in Powershell using the commands shown.
docker run --detach
--hostname gitlab.example.de
--ip 192.168.178.35
--publish 443:443 --publish 80:80 --publish 22:22
--name gitlab
--restart always
--volume $env:GITLAB_HOME/config:/etc/gitlab
--volume $env:GITLAB_HOME/logs:/var/log/gitlab
--volume $env:GITLAB_HOME/data:/var/opt/gitlab
--shm-size 256m
gitlab/gitlab-ee:latest
The creation of the container worked. Now I can reach gitlab in the browser via http://192.168.178.35.
Unfortunately https does not work. When I enter https://192.168.178.35 in my brwoser, it shows there the following error message:
Error: Secure connection failed.
Can someone help me and tell me what I need to do to set up access via https?
Try first with gitlab/gitlab-ce:15.4.0-ce.0, the community edition, instead of gitlab-ee (Enterprise edition)
And using a fixed label (15.4.0-ce.0), you will have less surprise if one day 'latest' changes.
Second check the "GitLab is unreachable in my browser" section, which mentions the firewall for possible root cause.

Docker container for portainer not exposing 9000 to host

I am trying to create the container by running docker run -d -p 8000:8000 -p 9000:9000 --name portainer --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer-ce:2.9.3
The container created but I am not able to access the portainer ui page using the localhost:9000enter image description here
As you can see the container is restarting. When every thing is fine the status will be running instead of restarting. It's possible that port is busy so it cant be exposed so you should check your port first and if the port was available you should check your image then to check if your image is working properly. It's better to use a docker file to make sure that your configuration is correct.

yet another cloud plugin in jenkins is not connecting to tcp://docker:2376 using ec2 instance

Iam not able to connect to tcp://docker:2376 in yet another plugin on jenkins. Jenkins in running in docker container in the port 8080. A docker dind is exposed with tcp port 2376 in another dind container. sharing a screenshot of the error here.
error log
Client sent an HTTP request to an HTTPS server.
com.github.kostyasha.yad_docker_java.com.github.dockerjava.api.exception.BadRequestException: Client sent an HTTP request to an HTTPS server.
at com.github.kostyasha.yad_docker_java.com.github.dockerjava.netty.handler.HttpResponseHandler.channelRead0(HttpResponseHandler.java:93)
at com.github.kostyasha.yad_docker_java.com.github.dockerjava.netty.handler.HttpResponseHandler.channelRead0(HttpResponseHandler.java:32)
at com.github.kostyasha.yad_docker_java.io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:105)
at com.github.kostyasha.yad_docker_java.io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
at com.github.kostyasha.yad_docker_java.io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
at com.github.kostyasha.yad_docker_java.io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
at com.github.kostyasha.yad_docker_java.io.netty.handler.logging.LoggingHandler.channelRead(LoggingHandler.java:241)
at com.github.kostyasha.yad_docker_java.io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
at com.github.kostyasha.yad_docker_java.io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
at com.github.kostyasha.yad_docker_java.io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
at com.github.kostyasha.yad_docker_java.io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:102)
at com.github.kostyasha.yad_docker_java.io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
at com.github.kostyasha.yad_docker_java.io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
at com.github.kostyasha.yad_docker_java.io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
at com.github.kostyasha.yad_docker_java.io.netty.channel.CombinedChannelDuplexHandler$DelegatingChannelHandlerContext.fireChannelRead(CombinedChannelDuplexHandler.java:438)
at com.github.kostyasha.yad_docker_java.io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:323)
at com.github.kostyasha.yad_docker_java.io.netty.handler.codec.ByteToMessageDecoder.channelInputClosed(ByteToMessageDecoder.java:384)
at com.github.kostyasha.yad_docker_java.io.netty.handler.codec.ByteToMessageDecoder.channelInactive(ByteToMessageDecoder.java:355)
at com.github.kostyasha.yad_docker_java.io.netty.handler.codec.http.HttpClientCodec$Decoder.channelInactive(HttpClientCodec.java:282)
at com.github.kostyasha.yad_docker_java.io.netty.channel.CombinedChannelDuplexHandler.channelInactive(CombinedChannelDuplexHandler.java:223)
at com.github.kostyasha.yad_docker_java.io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:245)
at com.github.kostyasha.yad_docker_java.io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:231)
at com.github.kostyasha.yad_docker_java.io.netty.channel.AbstractChannelHandlerContext.fireChannelInactive(AbstractChannelHandlerContext.java:224)
at com.github.kostyasha.yad_docker_java.io.netty.channel.DefaultChannelPipeline$HeadContext.channelInactive(DefaultChannelPipeline.java:1429)
at com.github.kostyasha.yad_docker_java.io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:245)
at com.github.kostyasha.yad_docker_java.io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:231)
at com.github.kostyasha.yad_docker_java.io.netty.channel.DefaultChannelPipeline.fireChannelInactive(DefaultChannelPipeline.java:947)
at com.github.kostyasha.yad_docker_java.io.netty.channel.AbstractChannel$AbstractUnsafe$8.run(AbstractChannel.java:822)
at com.github.kostyasha.yad_docker_java.io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:163)
at com.github.kostyasha.yad_docker_java.io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:404)
at com.github.kostyasha.yad_docker_java.io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:466)
at com.github.kostyasha.yad_docker_java.io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:897)
at com.github.kostyasha.yad_docker_java.io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
at java.lang.Thread.run(Thread.java:748)
To solve the issue connect docker.sock volume to host ie, while starting jenkins docker container
docker container run --name jenkins-blueocean --rm --detach --network jenkins --env DOCKER_HOST=tcp://docker:2376 --env DOCKER_CERT_PATH=/certs/client --env DOCKER_TLS_VERIFY=1 --volume /var/run/docker.sock:/var/run/docker.sock --volume jenkins-data:/var/jenkins_home --volume jenkins-docker-certs:/certs/client:ro --publish 8080:8080 --publish 50000:50000 jenkinsci/blueocean

How to integrate Elassandra in my Jhipster app by Docker Image?

I want to integrate elassandra in my jhipster app. In which i'm using cassandra as db.
i'm following the official elassandra installation process with docker image but their is confusion to understand which container_name have to add in which command.
here is official link: http://doc.elassandra.io/en/latest/installation.html#docker-image
and my port 9200 is not enabled
docker run --name some-elassandra -d strapdata/elassandra
docker run --name some-app --link some-elassandra:elassandra -d app-that-uses-elassandra
Elasticsearch ports 9200 and 9300 are exposed for communication between containers.
So when an elassandra container has been started like this :
docker run --name some-elassandra -d strapdata/elassandra
Contacting the REST API could be done with something like :
docker run -it --link some-elassandra --rm strapdata/elassandra curl some-elassandra:9200
If it still not working, be sure you pulled a recent version of the image, and feel free to open an issue on the github repository strapdata/docker-elassandra
This elassandra image is based on the official cassandra image. You may refer to its documentation for advanced setup.

Accessing gitlab inside docker container from local machine

I am trying to set up gitlab inside a docker container, where my docker container is running on a remote CentOS 7 server. Apparently, gitlab is running just fine because I can access the container and perform wget and also from the server. However, I cannot do the wget from my local machine. I would like to configure it so that I can access from anywhere, but I have no idea how to do this configuration or what it's missing.
I created the docker container like this:
sudo docker run --detach --hostname gitlab.example.com --publish 18080:80 --publish 12222:22 --publish 1443:443 --name gitlab --restart always --volume /srv/gitlab/config:/etc/gitlab --volume /srv/gitlab/logs:/var/log/gitlab --volume /srv/gitlab/data:/var/opt/gitlab gitlab/gitlab-ce:latest
just as the official documentation http://doc.gitlab.com/omnibus/docker/#after-starting-a-container was saying.
I would like to access via http://public_ip:18080. How can I achieve that?
I already tried opening port 18080 in CentOS:
$ sudo firewall-cmd --zone=public --add-port=18080/tcp --permanent
$ sudo firewall-cmd --reload
but it's not working (and I don't really know what I'm doing here).
The container is running and the command
docker ps -a
shows this:
88510679f781 gitlab/gitlab-ce:latest "/assets/wrapper" About an hour ago Up About an hour 0.0.0.0:12222->22/tcp, 0.0.0.0:18080->80/tcp, 0.0.0.0:1443->443/tcp gitlab
I can access the webpage from inside the server and from different machines inside the same cluster using the private ip of my server and port 18080. However, I cannot access with the preconfigured public ip of the server.
EDIT:
As pointed out in the replies, the issue was that the firewall was not letting us listen on every port. Changing the mapping to an available port made the trick

Resources