Created
September 4, 2018 14:43
-
-
Save masayuki-tsuji/0fcde77b28f727a9ad1ab8d3557f689d to your computer and use it in GitHub Desktop.
AWS EC2にDockerでJenkinsを導入 ref: https://qiita.com/tu-kun/items/741cb80276e1c345c6e4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '3.5' | |
services: | |
jenkins: | |
image: jenkins:latest | |
container_name: jenkins | |
restart: always | |
ports: | |
- 3001:8080 | |
environment: | |
JENKINS_OPTS: '--prefix=/jenkins' | |
volumes: | |
- /var/www/jenkins/home:/var/jenkins_home |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ sudo su | |
$ cd /var/www | |
$ chown -R 1000:1000 jenkins |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ docker-compose up -d | |
$ docker-compose ps |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ cat /var/www/jenkins/home/secrets/initialAdminPassword |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment