Access Gitlab container via https - docker

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.

Related

gitlab VM your account is pending approval from your GitLab administrator and hence blocked

I am following a tutorial that had me "install" gitlab via docker on my Virtual Box, VM, osboxes#osboxes. Once the gitlab was "install" completed, I used firefox and entered the static IP address of my osboxes, http://192.168.151.150.
Firefox went straight to a gitlab page requesting username and password (http://192.168.151.150/users/sign_in). I had no idea what to enter, so I entered register. Then an attempt to use what I registered states,
"Your account is pending approval from your GitLab administrator and hence blocked. Please contact your GitLab administrator if you think this is an error."
Any idea what I am supposed to enter as username and password?
This is how I "installed gitlab"
sudo docker run --detach
--hostname 192.168.151.150
--publish 192.168.151.150:443:443
--publish 192.168.151.150:80:80
--publish 192.168.151.150:9222:22
--name gitlab
--restart always
--volume $GITLAB_HOME/config:/etc/gitlab
--volume $GITLAB_HOME/logs:/var/log/gitlab
--volume $GITLAB_HOME/data:/var/opt/gitlab
--shm-size 256m
gitlab/gitlab-ce:latest

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.

run GitLab with docker image in windows 10 on localhost

I have installed a docker image "gitlab/gitlab-ce" on windows 10 and I try to run with following command.
docker run --detach --hostname https://localhost/ --publish 40443:80 --name GitLab --restart always --volume d:\gitlab\config:/etc/gitlab --volume d:\gitlab\logs:/var/log/gitlab --volume d:\gitlab\data:/var/opt/gitlab gitlab/gitlab-ce:latest
but when it doesn't accessible in browser.
"This site can’t be reached.
localhost unexpectedly closed the connection."
I don't known what is wrong here in GitLab document the host name is "gitlab.example.com" and I don't known what is domain refer to.
You should use your own ip instead of "localhost" word.Because localhost IP is different for the docker.So you should check your ip address with ipconfig cmd command.And set the docker run command with your ip address.
I have write step by step at this comment : https://stackoverflow.com/a/66357935/11040700
Your docker container is exposed on :40443 port
Ref.: https://docs.docker.com/config/containers/container-networking/
P.S. hostname should be without https://

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

Docker windows 10 with gitlab

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

Resources