Skip to content

Instantly share code, notes, and snippets.

@kingbin
Last active May 22, 2020 20:15
Show Gist options
  • Save kingbin/310723add19449c4dc2f2e2d43fe1ea7 to your computer and use it in GitHub Desktop.
Save kingbin/310723add19449c4dc2f2e2d43fe1ea7 to your computer and use it in GitHub Desktop.
Using Docker toolbox to create a persistent Gitlab-CE install in Windows 10
$ docker create --name gitlab-data --volume /d/docker/gitlab:/etc/gitlab gitlab/gitlab-ce:latest
# Make sure Bridging is set on the VM in VirtualBox
$ docker run --publish 8080:80 --publish 2222:22 --publish 4443:443 --name gitlab --restart always --volumes-from gitlab-data gitlab/gitlab-ce:latest
Using docker 1.13.1
/******************************************************************************************************************/
Configure GitLab for your system by editing /etc/gitlab/gitlab.rb file
And restart this container to reload settings.
To do it use docker exec:
docker exec -it gitlab vim /etc/gitlab/gitlab.rb
docker restart gitlab
For a comprehensive list of configuration options please see the Omnibus GitLab readme
https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/README.md
If this container fails to start due to permission problems try to fix it by executing:
docker exec -it gitlab update-permissions
docker restart gitlab
@Dokman
Copy link

Dokman commented Jan 11, 2018

where i can find the linux image cause i need to move to another HDD the git data

@denzuko
Copy link

denzuko commented Feb 16, 2018

@Dokman if one is using a data container for gitlab then one would first commit the gitlab-data container as an image then push that image to your registry (internal, private on the new machine, or cloud base). Then pull that image down from the registry when reprovisioning the new harddrive.

As an type, the windows version of docker is just a linux virtual machine image running in the background. Same for the mac version. Docker is built on linux tech for linux. Everything else just hides that away behind a hypervisor to make it look like its for x platform. Thus, the above gist by kingbin is cross platform.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment