LoginSignup
0
0

More than 3 years have passed since last update.

GitLab CIでservicesにdockerイメージを使った時のhostname

Last updated at Posted at 2019-06-05

TL;DR

  • localhostではない
  • dockerイメージ名がhostname
  • dockerイメージ名にスラッシュがあるときは、スラッシュが-__で置換

  • docker:dnd なら dockerがhostname
  • golang:1.12.5-alpine3.9ならgolangがhostname
  • danielgtaylor/apisprout:latestの場合は2つ
    • スラッシュ/がハイフン- に置換したdanielgtaylor-apisprout
    • スラッシュ/をダブルアンダースコア__ に置換したdanielgtaylor__apisprout

役立つ場面

services:
  - docker:dind
lint:
  stage: test
  script:
    - docker-compose up -d
    - dockerize -wait http://docker:4000 -timeout 30s
    - # skip

c.f.

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