Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
gitlab-runner
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Lars Seipel
gitlab-runner
Commits
20b587cd
Commit
20b587cd
authored
9 years ago
by
Kamil Trzcinski
Browse files
Options
Downloads
Patches
Plain Diff
Added information about using runner in SELinux environment [ci skip]
parent
40123b23
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
docs/faq/README.md
+8
-0
8 additions, 0 deletions
docs/faq/README.md
docs/install/docker.md
+22
-0
22 additions, 0 deletions
docs/install/docker.md
with
30 additions
and
0 deletions
docs/faq/README.md
+
8
−
0
View file @
20b587cd
...
...
@@ -34,3 +34,11 @@ detect it if it is available and automatically make use of it.
## 4. I'm seeing `x509: certificate signed by unknown authority`
Please
[
See the self-signed certificates
](
../configuration/tls-self-signed.md
)
## 5. I get `Permission Denied` when accessing the `/var/run/docker.sock`
If you want to use Docker executor,
and you are connecting to Docker Engine installed on server.
You can see the
`Permission Denied`
error.
The most likely cause is that your system uses SELinux (enabled by default on CentOS, Fedora and RHEL).
Check your SELinux policy on your system for possible denials.
This diff is collapsed.
Click to expand it.
docs/install/docker.md
+
22
−
0
View file @
20b587cd
...
...
@@ -115,3 +115,25 @@ gitlab/gitlab-runner alpine 7c431ac8f30f 13 hours ago
**Alpine Linux image is designed to use only Docker as the method of spawning runners.**
The original
`gitlab/gitlab-runner:latest`
is based on Ubuntu 14.04 LTS.
### SELinux
Some distributions (CentOS, RedHat, Fedora) use SELinux by default to enhance the security of the underlying system.
The special care must be taken when dealing with such configuration.
1.
If you want to use Docker executor to run builds in containers you need to access the
`/var/run/docker.sock`
.
However, if you have a SELinux in enforcing mode, you will see the
`Permission denied`
when accessing the
`/var/run/docker.sock`
.
Install the
`selinux-dockersock`
and to resolve the issue: https://github.com/dpw/selinux-dockersock.
1.
Make sure that persistent directory is created on host:
`mkdir -p /srv/gitlab-runner/config`
.
1.
Run docker with
`:Z`
on volumes:
docker run -d --name gitlab-runner --restart always \
-v /var/run/docker.sock:/var/run/docker.sock \
-v /srv/gitlab-runner/config:/etc/gitlab-runner:Z \
gitlab/gitlab-runner:latest
More information about the cause and resolution can be found here:
http://www.projectatomic.io/blog/2015/06/using-volumes-with-docker-can-cause-problems-with-selinux/
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment