Commit 5a332c59 authored by Marcia Ramos's avatar Marcia Ramos

Merge branch 'docs/docker-entrypoint' into 'master'

Properly explain when advanced Docker options were introduced

See merge request !13608
parents 09dfcc20 1a39d4f0
...@@ -117,7 +117,7 @@ following these rules: ...@@ -117,7 +117,7 @@ following these rules:
created (requires GitLab Runner v1.1.0 or higher) created (requires GitLab Runner v1.1.0 or higher)
To override the default behavior, you can To override the default behavior, you can
[specify a service alias](#available-settings-for-services-entry). [specify a service alias](#available-settings-for-services).
## Define `image` and `services` from `.gitlab-ci.yml` ## Define `image` and `services` from `.gitlab-ci.yml`
...@@ -183,8 +183,7 @@ test: ...@@ -183,8 +183,7 @@ test:
## Extended Docker configuration options ## Extended Docker configuration options
> **Note:** > Introduced in GitLab and GitLab Runner 9.4.
This feature requires GitLab 9.4 and GitLab Runner 9.4 or higher.
When configuring the `image` or `services` entries, you can use a string or a map as When configuring the `image` or `services` entries, you can use a string or a map as
options: options:
...@@ -221,28 +220,29 @@ For example, the following two definitions are equal: ...@@ -221,28 +220,29 @@ For example, the following two definitions are equal:
### Available settings for `image` ### Available settings for `image`
> **Note:** > Introduced in GitLab and GitLab Runner 9.4.
This feature requires GitLab 9.4 and GitLab Runner 9.4 or higher.
| Setting | Required | Description | | Setting | Required | GitLab version | Description |
|------------|----------|-------------| |------------|----------|----------------| ----------- |
| `name` | yes, when used with any other option | Full name of the image that should be used. It should contain the Registry part if needed. | | `name` | yes, when used with any other option | 9.4 |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 the container's entrypoint. It will be translated to Docker's `--entrypoint` option while creating the container. The syntax is similar to [`Dockerfile`'s `ENTRYPOINT`][entrypoint] directive, where each shell token is a separate string in the array. | | `entrypoint` | no | 9.4 |Command or script that should be executed as the container's entrypoint. It will be translated to Docker's `--entrypoint` option while creating the container. The syntax is similar to [`Dockerfile`'s `ENTRYPOINT`][entrypoint] directive, where each shell token is a separate string in the array. |
### Available settings for `services` ### Available settings for `services`
> **Note:** > Introduced in GitLab and GitLab Runner 9.4.
This feature requires GitLab 9.4 and GitLab Runner 9.4 or higher.
| Setting | Required | Description | | Setting | Required | GitLab version | Description |
|------------|----------|-------------| |------------|----------|----------------| ----------- |
| `name` | yes, when used with any other option | Full name of the image that should be used. It should contain the Registry part if needed. | | `name` | yes, when used with any other option | 9.4 | 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 the container's entrypoint. It will be translated to Docker's `--entrypoint` option while creating the container. The syntax is similar to [`Dockerfile`'s `ENTRYPOINT`][entrypoint] directive, where each shell token is a separate string in the array. | | `entrypoint` | no | 9.4 |Command or script that should be executed as the container's entrypoint. It will be translated to Docker's `--entrypoint` option while creating the container. The syntax is similar to [`Dockerfile`'s `ENTRYPOINT`][entrypoint] directive, where each shell token is a separate string in the array. |
| `command` | no | Command or script that should be used as the container's command. It will be translated to arguments passed to Docker after the image's name. The syntax is similar to [`Dockerfile`'s `CMD`][cmd] directive, where each shell token is a separate string in the array. | | `command` | no | 9.4 |Command or script that should be used as the container's command. It will be translated to arguments passed to Docker after the image's name. The syntax is similar to [`Dockerfile`'s `CMD`][cmd] directive, where each shell token is a separate string in the array. |
| `alias` | no | Additional alias that can be used to access the service from the job's container. Read [Accessing the services](#accessing-the-services) for more information. | | `alias` | no | 9.4 |Additional alias that can be used to access the service from the job's container. Read [Accessing the services](#accessing-the-services) for more information. |
### Starting multiple services from the same image ### Starting multiple services from the same image
> Introduced in GitLab and GitLab Runner 9.4. Read more about the [extended
configuration options](#extended-docker-configuration-options).
Before the new extended Docker configuration options, the following configuration Before the new extended Docker configuration options, the following configuration
would not work properly: would not work properly:
...@@ -274,6 +274,9 @@ in `.gitlab-ci.yml` file. ...@@ -274,6 +274,9 @@ in `.gitlab-ci.yml` file.
### Setting a command for the service ### Setting a command for the service
> Introduced in GitLab and GitLab Runner 9.4. Read more about the [extended
configuration options](#extended-docker-configuration-options).
Let's assume you have a `super/sql:latest` image with some SQL database Let's assume you have a `super/sql:latest` image with some SQL database
inside it and you would like to use it as a service for your job. Let's also inside it and you would like to use it as a service for your job. Let's also
assume that this image doesn't start the database process while starting assume that this image doesn't start the database process while starting
...@@ -313,6 +316,9 @@ As you can see, the syntax of `command` is similar to [Dockerfile's `CMD`][cmd]. ...@@ -313,6 +316,9 @@ As you can see, the syntax of `command` is similar to [Dockerfile's `CMD`][cmd].
### Overriding the entrypoint of an image ### Overriding the entrypoint of an image
> Introduced in GitLab and GitLab Runner 9.4. Read more about the [extended
configuration options](#extended-docker-configuration-options).
Let's assume you have a `super/sql:experimental` image with some SQL database Let's assume you have a `super/sql:experimental` image with some SQL database
inside it and you would like to use it as a base image for your job because you inside it and you would like to use it as a base image for your job because you
want to execute some tests with this database binary. Let's also assume that want to execute some tests with this database binary. Let's also assume that
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment