Skip to content

Instantly share code, notes, and snippets.

@evenme
Created January 28, 2016 21:57
Show Gist options
  • Save evenme/ef4d11c3ef3ecba295ea to your computer and use it in GitHub Desktop.
Save evenme/ef4d11c3ef3ecba295ea to your computer and use it in GitHub Desktop.
Gitlab update steps using docker
# Remove old container and image
docker stop <CONTAINER>
docker rm <CONTAINER>
docker rmi $(docker images | grep gitlab | awk {'print $3'})
# Download and run the new image (latest)
docker run -t \
--publish 443:443 \
--publish 80:80 \
--publish 22: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
# Perform rake checks and db migrations
docker exec -it gitlab gitlab-rake gitlab:check
docker exec -it gitlab gitlab-rake db:migrate
# Reconfigure and restart container
docker exec -it gitlab gitlab-ctl reconfigure
docker restart gitlab
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment