LoginSignup
8
6

More than 5 years have passed since last update.

Docker for MacでGitlabを試す

Posted at

Dockerで5分くらいでGitLabを試すを参考にdocker-compose.ymlを落としてきて、docker-compose up -d でいけました。

ただし、Docker for Macだとボリュームをマウントするパスがエラーになるので、docker-compose.ymlを編集する必要があります。
(↓はdocker-compose.ymlのdiff取りやすいように、wgetでなく、git cloneでリポジトリごと落としてます。)

$ git diff
diff --git a/docker-compose.yml b/docker-compose.yml
index 648e3b7..7105a17 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -7,13 +7,13 @@ services:
     command:
     - --loglevel warning
     volumes:
-    - /srv/docker/gitlab/redis:/var/lib/redis:Z
+    - ./docker/gitlab/redis:/var/lib/redis:Z

   postgresql:
     restart: always
     image: sameersbn/postgresql:9.5
     volumes:
-    - /srv/docker/gitlab/postgresql:/var/lib/postgresql:Z
+    - ./docker/gitlab/postgresql:/var/lib/postgresql:Z
     environment:
     - DB_USER=gitlab
     - DB_PASS=password
@@ -30,7 +30,7 @@ services:
     - "10080:80"
     - "10022:22"
     volumes:
-    - /srv/docker/gitlab/gitlab:/home/git/data:Z
+    - ./docker/gitlab/gitlab:/home/git/data:Z
     environment:
     - DEBUG=false
8
6
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
8
6