K
K
Kirill Kazakov2018-10-12 21:13:57
Continuous Integration
Kirill Kazakov, 2018-10-12 21:13:57

What is the difference between image vs service in gitlab-ci?

Please explain the difference between image (image) and service (service) in gitlab-ci.yml.
The service indicates on which runner (runner) the job can work, and image in which container the code of the job will be executed?
Off. dock

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry Shitskov, 2018-10-12
@mausspb

Read the entire doc, there are examples of what service is good for/not good for.
image - yes, the job code will be executed there. For example, it can be any container with a base linux image. Or, for example, an npm container if you are building/testing a Nodejs application.
service is some additional container(s) linked to the main one. Services (overwhelmingly, network services) are most needed at the testing stage, because your application for work may need, for example, a database, as discussed in the dock examples

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question