Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tranphuquy19/nestjs-jenkins
https://github.com/tranphuquy19/nestjs-jenkins
Last synced: 2 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/tranphuquy19/nestjs-jenkins
- Owner: tranphuquy19
- Created: 2021-02-02T09:31:01.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2021-03-31T06:55:29.000Z (over 3 years ago)
- Last Synced: 2023-03-03T15:38:27.790Z (over 1 year ago)
- Language: Shell
- Size: 127 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## NestJS with Jenkins
### Enable mount Docker sock into Docker containers
1. Edit file `/lib/systemd/system/docker.service`
```systemd
# /lib/systemd/system/docker.service...
[Service]
Type=notify
# the default is not to use systemd for cgroups because the delegate issues still
# exists and systemd currently does not support the cgroup feature set required
# for containers run by docker
ExecStart=/usr/bin/dockerd -H unix://var/run/docker.sock -H tcp:// --containerd=/run/containerd/containerd.sock...
```2. Assign permission docker.sock
`chmod 666 /var/run/docker.sock`
3. Restart Docker service
```shell
systemctl daemon-reload
systemctl restart docker.service
```### Install Jenkins using Docker
```bash
docker run \
-d \
-p 8080:8080 \
-p 50000:50000 \
-v /var/run/docker.sock:/var/run/docker.sock \
-v $(which docker):$(which docker) \
-v /home/jenkins/data:/var/jenkins_home \
--user 1000:999 \
--name jenkins-server \
--restart=always \
jenkins/jenkins:lts
```