Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
6af17cd1
Commit
6af17cd1
authored
Feb 26, 2021
by
Suzanne Selhorn
Committed by
Marcel Amirault
Feb 26, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
More edits to the intro text
Related to:
https://gitlab.com/gitlab-org/gitlab/-/issues/300312
parent
03669dea
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
22 deletions
+18
-22
doc/ci/docker/using_docker_build.md
doc/ci/docker/using_docker_build.md
+6
-6
doc/ci/docker/using_docker_images.md
doc/ci/docker/using_docker_images.md
+12
-16
No files found.
doc/ci/docker/using_docker_build.md
View file @
6af17cd1
...
...
@@ -7,14 +7,14 @@ type: concepts, howto
# Use Docker to build Docker images
You can use GitLab CI/CD with Docker
Engine to build and test Docker-based project
s.
You can use GitLab CI/CD with Docker
to build and test Docker image
s.
For example, you might want to:
1.
Create a
n application image
.
1.
Run tests against the
created
image.
1.
Push image to a remote registry.
1.
Deploy to a server from the pushed image
.
1.
Create a
Docker image of your application
.
1.
Run tests against the image.
1.
Push
the
image to a remote registry.
1.
Use the image to deploy your application to a server
.
Or, if your application already has a
`Dockerfile`
, you can
use it to create and test an image:
...
...
@@ -27,7 +27,7 @@ docker push my-registry:5000/my-image
```
To run Docker commands in your CI/CD jobs, you must configure
GitLab Runner to
enable
`docker`
support
.
GitLab Runner to
support
`docker`
commands
.
## Enable Docker commands in your CI/CD jobs
...
...
doc/ci/docker/using_docker_images.md
View file @
6af17cd1
...
...
@@ -7,27 +7,23 @@ type: concepts, howto
# Run your CI/CD jobs in Docker containers
GitLab CI/CD in conjunction with
[
GitLab Runner
](
../runners/README.md
)
can use
[
Docker Engine
](
https://www.docker.com/
)
to test and build any application.
You can run your CI/CD jobs in separate, isolated Docker containers.
Docker is an open-source project that has predefined images you can use to
run applications in independent "containers." These containers run in a single Linux
instance.
[
Docker Hub
](
https://hub.docker.com/
)
is a database of pre-built images you can
use to test and build your applications.
When you run a Docker container on your local machine, it acts as a reproducible build environment.
You can run tests in the container, instead of testing on a dedicated CI/CD server.
When you use Docker with GitLab CI/CD, Docker runs each job in a separate and isolated
container. You specify the container image in the project's
[
`.gitlab-ci.yml`
](
../yaml/README.md
)
file.
To run CI/CD jobs in a Docker container, you need to:
Docker containers provide a reproducible build environment that
can run on your workstation. When a Docker container is running, you can test
commands from your shell, rather than having to
test them on a dedicated CI server.
-
Register a runner that uses the Docker executor. Then all jobs run in a Docker container.
-
Specify an image in your
`.gitlab-ci.yml`
file. The runner creates a container from this image
and runs the jobs in it.
-
Optional. Specify other images in your
`.gitlab-ci.yml`
file. These containers are known as
[
"services"
](
#what-is-a-service
)
and you can use them to run services like MySQL separately.
## Register
Docker Runne
r
## Register
a runner that uses the Docker executo
r
To use GitLab Runner with Docker you need to
[
register a
new
runner
](
https://docs.gitlab.com/runner/register/
)
t
o use the
`docker`
executor.
To use GitLab Runner with Docker you need to
[
register a runner
](
https://docs.gitlab.com/runner/register/
)
t
hat uses the Docker
executor.
In this example, we first set up a temporary template to supply the services:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment