用docker搭建公司内部的gitlab 和 wiki

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' \
--volume /srv/docker/gitlab/gitlab:/home/git/data \
sameersbn/gitlab




1、运行一个PostgreSQL容器
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 \
sameersbn/postgresql:9.4-2
2、运行一个Redis容器


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






3、运行GitLab容器


docker run --name='gitlab' -d   -e 'GITLAB_PORT=10080' -e 'GITLAB_SSH_PORT=10022' -e 'GITLAB_HOST=dev.codemao.cn' -e 'GITLAB_BACKUPS=monthly'  -e 'GITLAB_SECRETS_DB_KEY_BASE=gitlab'  -p 10022:22 -p 10080:80 -v /mnt/data/gitlab:/home/git/data -v /mnt/data/gitlab/backups:/home/git/data/backups --link gitlab-redis:redisio --link gitlab-postgresql:postgresql  --restart=always  sameersbn/gitlab:latest






https://hub.docker.com/r/synctree/mediawiki/


docker pull synctree/mediawiki


How to use this image
docker run --name some-mediawiki --link some-mysql:mysql -d synctree/mediawiki
The following environment variables are also honored for configuring your
MediaWiki instance:


-e MEDIAWIKI_DB_HOST=ADDR:PORT (defaults to the address and port of the
linked mysql container)
-e MEDIAWIKI_DB_USER=... (defaults to "root")
-e MEDIAWIKI_DB_PASSWORD=... (defaults to the value of the
MYSQL_ROOT_PASSWORD environment variable from the linked mysql container)
-e MEDIAWIKI_DB_NAME=... (defaults to "mediawiki")
If the MEDIAWIKI_DB_NAME specified does not already exist in the given MySQL
container, it will be created automatically upon container startup, provided
that the MEDIAWIKI_DB_USER specified has the necessary permissions to create
it.


To use with an external database server, use MEDIAWIKI_DB_HOST (along with
MEDIAWIKI_DB_USER and MEDIAWIKI_DB_PASSWORD if necessary):


docker run --name some-mediawiki -e MEDIAWIKI_DB_HOST=10.0.0.1:3306 \
    -e MEDIAWIKI_DB_USER=app -e MEDIAWIKI_DB_PASSWORD=secure synctree/mediawiki
If you'd like to be able to access the instance from the host without the
container's IP, standard port mappings can be used:


docker run --name some-mediawiki --link some-mysql:mysql -p 8080:80 -d synctree/mediawiki
Then, access it via http://localhost:8080 or http://host-ip:8080 in a browser.

你可能感兴趣的:(运维)