LoginSignup
2
0

More than 3 years have passed since last update.

DockerでGitLabとDB2のコンテナを起動するコマンド覚書

Last updated at Posted at 2019-07-09

GitLabを起動する

docker-compose.yml
web:
    image: 'gitlab/gitlab-ce:latest'
    restart: always
    hostname: 'localhost'
    environment:
      GITLAB_OMNIBUS_CONFIG: |
        external_url 'http://localhost:9010'
        gitlab_rails['gitlab_shell_ssh_port'] = 2022
    ports:
      - '9010:9010'
      - '2022:22'
    volumes:
      - '/srv/gitlab/config:/etc/gitlab'
      - '/srv/gitlab/logs:/var/log/gitlab'
      - '/srv/gitlab/data:/var/opt/gitlab'

DB2を起動する

ディレクトリ構成

/docker-compose.yml
/db/Dockerfile

Dockerfile

FROM ibmcom/db2express-c:latest
docker-compose.yml
db2:
    container_name: mydb2
    ports:
        - '50000:50000'
    environment:
        - LICENSE=accept
        - DB2INST1_PASSWORD=password
        - DBNAME=testdb
    volumes:
        - '/db2:/database'
    image: ibmcom/db2

起動コマンド

docker-compose up

※微調整が必要な可能性あり

2
0
2

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
2
0