see for details: https://docs.gitlab.com/omnibus/docker/
the first time will wait a long time for initailize database.
sudo docker run --detach \
--hostname gitlab.example.com \
--publish 443:443 --publish 80:80 --publish 2222:22 \
--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
sudo docker logs -f gitlab
sudo docker stop gitlab
sudo docker rm gitlab
# host
sudo docker exec -it gitlab /bin/bash
# container
gitlab-rails console production
# irb
irb(main):001:0> user = User.where(id: 1).first
irb(main):002:0> user = user.password = 'yourpassword'
irb(main):003:0> user.save!
Content type
Image
Digest
Size
706.4 MB
Last updated
about 7 years ago
docker pull jeanhwea/gitlab-ce