diff options
author | Tomasz Maczukin <tomasz@maczukin.pl> | 2017-06-30 16:04:01 +0200 |
---|---|---|
committer | Achilleas Pipinellis <axilleas@axilleas.me> | 2017-07-03 15:24:23 +0200 |
commit | da2f003ccfe85893c6b405190a1bfd9f176ffea8 (patch) | |
tree | 15451b69b393bb1f27716df68325c0950bb9e355 | |
parent | 512254ef7aeb876913a659a2ae5a88bf9fa43016 (diff) | |
download | gitlab-ce-da2f003ccfe85893c6b405190a1bfd9f176ffea8.tar.gz |
Update syntax description to new syntax introduced in !12536.
-rw-r--r-- | doc/ci/docker/using_docker_images.md | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/doc/ci/docker/using_docker_images.md b/doc/ci/docker/using_docker_images.md index fee8f3fb9e7..c5a70d83201 100644 --- a/doc/ci/docker/using_docker_images.md +++ b/doc/ci/docker/using_docker_images.md @@ -131,13 +131,13 @@ configuration options for image and services: ```yaml image: name: ruby:2.2 - entrypoint: /bin/bash + entrypoint: ["/bin/bash"] services: - name: my-postgres:9.4 alias: db-postgres - entrypoint: /usr/local/bin/db-postgres - command: start + entrypoint: ["/usr/local/bin/db-postgres"] + command: ["start"] before_script: - bundle install @@ -182,15 +182,15 @@ services: | Setting | Required | Description | |------------|----------|-------------| | name | yes | Full name of the image that should be used. It should contain the registry part if needed. | -| entrypoint | no | Command or script that should be executed as container's entrypoint. It will be translated to Docker's `--entrypoint` option while creating container. | +| entrypoint | no | Command or script that should be executed as container's entrypoint. It will be translated to Docker's `--entrypoint` option while creating container. The syntax is similar to `Dockerfile`'s `ENTRYPOINT` directive, where each shell token is a separate string in the array. | ### Available settings for `services` entry | Setting | Required | Description | |------------|----------|-------------| | name | yes | Full name of the image that should be used. It should contain the registry part if needed. | -| entrypoint | no | Command or script that should be used as container's entrypoint. It will be translated to Docker's `--entrypoint` option while creating container. | -| command | no | Command or script and eventual arguments that should be used as container's command. It will be translated to arguments passed to Docker after image's name. | +| entrypoint | no | Command or script that should be used as container's entrypoint. It will be translated to Docker's `--entrypoint` option while creating container. The syntax is similar to `Dockerfile`'s `ENTRYPOINT` directive, where each shell token is a separate string in the array. | +| command | no | Command or script and eventual arguments that should be used as container's command. It will be translated to arguments passed to Docker after image's name. The syntax is similar to `Dockerfile`'s `CMD` directive, where each shell token is a separate string in the array. | | alias | no | Additional alias, that can be used to access service from job's container. Read [Accessing the services](#accessing-the-services) for more information. | ### Example usages @@ -250,7 +250,7 @@ services: - my-super-sql:latest ``` -With docker extended docker configuration we can now do this simple, setting +With extended docker configuration we can now do this simple, setting only proper configuration in `.gitlab-ci.yml`, e.g: ```yaml @@ -258,13 +258,15 @@ only proper configuration in `.gitlab-ci.yml`, e.g: services: - name: super/sql:latest - command: /usr/bin/super-sql run + command: ["/usr/bin/super-sql", "run"] ``` +As you can see the syntax of `command` entry is similar to Dockerfile's `CMD`. + #### Overriding entrypoint of job's image Let's assume we have a `super/sql:experimental` image with some SQL database -inside. We would like to use it as base for our job, because we wan't to +inside. We would like to use it as base for our job, because we want to execute some tests with this database binary. The problem is that this image is configured with `/usr/bin/super-sql run` as entrypoint. That means, that when starting container without additional options it will run database's @@ -295,7 +297,10 @@ only proper configuration in `.gitlab-ci.yml`, e.g: image: name: super/sql:experimental - entrypoint: /bin/sh + entrypoint: ["/bin/sh"] +``` + +As you can see the syntax of `entrypoint` entry is similar to Dockerfile's `ENTRYPOINT`. ## Define image and services in `config.toml` |