Using gitlab image on Docker desktop and setup on local host, uploaded some issues to my project, whenever try to access the issue it will go to container id instead of local host, please help
What exactly do you mean by that? Does it redirects you in the browser from http://localhost
to http://<containerid>
?
If it does, I guess Gitlab reads our hostname automatically during installation and you need to change that manually. I donāt know how, but I should be mentioned in the GitLab documentation. This is just an example and I havenāt read the documentation, it was just the first result when I searched for āgitlab hostname dockerā:
version: '3.6'
services:
web:
image: 'gitlab/gitlab-ee:latest'
restart: always
hostname: 'gitlab.example.com'
environment:
GITLAB_OMNIBUS_CONFIG: |
external_url 'https://gitlab.example.com'
# Add any other gitlab.rb configuration here, each on its own line
ports:
- '80:80'
- '443:443'
- '22:22'
volumes:
- '$GITLAB_HOME/config:/etc/gitlab'
- '$GITLAB_HOME/logs:/var/log/gitlab'
- '$GITLAB_HOME/data:/var/opt/gitlab'
shm_size: '256m'
See the hostname parameter in the compose file. Without that your hostname will be the container id. You can try to change it to localhost, but I would rather set a custom hostname in the hosts file: C:\Windows\System32\drivers\etc\hosts
Like:
127.0.0.1 mygitlab.local
Set the hostname for the container:
hostname: mygitlab.local
Then you can install Gitlab using the URL: http://mygitlab.local
.
Of course add the portname to the URL if you are not using port 80.
Thanks for the reply , but still getting the same error, please check the below link to see the issue clip
I donāt know this site (I googled it) and I would not download an unkown rar. Can you share the error message here and code here so it will be available even when for some reason the file will be deleted on WeTransfer?
Use the code block button as I did above the message area which looks like this: </>
on this image I have hosted the gitlab image on docker desktop on port 8080. when I click on the issue "unable to update stock for serial item " it will not open , you can see the next screnshot with the error
here you can see āeb82656acc96ā this is the container id and it is replacing the local host, if I remove this āeb82656acc96ā and paste local āhost:8080ā the issue is opened
this is the the issue
Did you reinstall GitLab as I suggested? If you just set the hostname after GitLab was installed the hostname will not be changed in the database if it is stored there. If you can share your compose file or command with which you run the container, we can check that too to make sure the setting is correct.
I have downloaded the Gitlab Image ādocker pull gitlab/gitlab-eeā from ādocker hubā and there was no config file created. after download, I have reset the password by using the below.
docker exec -it d0bbe0e1e3db bash ā with your CONTAINER_ID
$ gitlab-rails console -e production
user = User.where(id: 1).first
user.password = āgodisgr8ā
user.password_confirmation = āgodisgr8ā
user.save
exit
I donāt understand. What config file did you expect when you downloaded the image? I wrote about the database, not files, but even if it is stored in files, that would be on volumes. If you completely reinstall gitlab (which means deleting volumes as well), that should work.
how is it related to my previous question in my previous post? Reinstalling is not just resetting a password.
please, show how you create the container (compose file or command), because I canāt tell what is wrong without that. If you have secret data in the compose file or in your command, use a placeholder there.