OSX 10.11.3 Install gitlab server using docker

My English not good, sorry!
I install gitlab server using docker.

First I install Docker Toolbox,and then I follow the steps below:

  • Connection to remote host via docker-machine fails
  • Linked Docker Containers with Mesos/Marathon
  • Failed to connect docker url with PHP Unit
  • Add Docker Machine to Swarm cluster after creation
  • Using iPython with remote docker container in a local project directory
  • Docker Error - “jq: error: Cannot iterate over null”
  • Step 1. Launch a postgresql container

    docker run --name gitlab-postgresql -d \
    --env 'DB_NAME=gitlabhq_production' \
    --env 'DB_USER=gitlab' --env 'DB_PASS=password' \
    --volume /srv/docker/gitlab/postgresql:/var/lib/postgresql \

    Step 2. Launch a redis container

    docker run --name gitlab-redis -d \
    --volume /srv/docker/gitlab/redis:/var/lib/redis \

    Step 3. Launch the gitlab container

    docker run --name gitlab -d \
    --link gitlab-postgresql:postgresql --link gitlab-redis:redisio \
    --publish 10022:22 --publish 10080:80 \
    --env 'GITLAB_PORT=10080' --env 'GITLAB_SSH_PORT=10022' \
    --env 'GITLAB_SECRETS_DB_KEY_BASE=long-and-random-alpha-numeric-string' \
    --volume /srv/docker/gitlab/gitlab:/home/git/data \

    After the end,I can by access to gitlab server, and can create a project, but I can’t through the http://localhost:10080 access to gitlab server, others can not upload and download, should not do port forwarding, I should how to do?

  • how to mount volume in ElasticBeanstalk Docker container using only Dockerrun.aws.json
  • Can't read user input inside the Docker using Maven plugin
  • Docker container data lost on host restart
  • Kubernetes Guestbook Example Not Loading Page
  • nginx + PHP-FPM: Doing away with fastcgi params
  • RabbitMQ inside docker won't end gracefully and cannot reconnect
  • One Solution collect form web for “OSX 10.11.3 Install gitlab server using docker”

    should not do port forwarding

    Well actually yuo should do a port-forward 10080 to your actual host (Windows or Mac) through the VM which hosts the boot2docker-based Linux.
    See “Connect to a Service running inside a docker container from outside”

    VBoxManage controlvm "default" natpf1 "tcp-port10080,tcp,,10080,,10080"
    VBoxManage controlvm "default" natpf1 "udp-port10080,udp,,10080,,10080"

    (Replace default with the name of your docker-machine: see docker-machine ls)

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.