Install Jenkins (docker based)
💡 How to install Jenkins based on docker.
Test environment
- Ubuntu 18.04
- docker 18.09.1
Install
Create host <-> container permanent volume
$ mkdir -p /app/jenkins
$ chmod 777 /app/jenkins
Run Jenkins
$ docker run -d --name jenkins -p 8080:8080 -p 50000:50000 -v /app/jenkins:/var/jenkins_home \
-u root -e JAVA_OPTS='-Duser.timezone=Asia/Seoul -Dfile.encoding=UTF-8 -Dsun.jnu.encoding=UTF-8' leechungkyu/jenkins
Continue installation from web browser
🌍
http://<ip>:8080
connecting, and continue the installation.
Input password
/var/jenkins_home/secrets/initialAdminPassword
$ docker exec -it jenkins /bin/bash
$ cat /var/jenkins_home/secrets/initialAdminPassword
3830de413f4d49f7963223507527f02a # password
Plugin installation
Install by default and wait for the ProgressBar to complete.
Create admin account
Enter your account name (login ID), password, name, and email address.
Jenkins URL Setting
Start Jenkins
Note
- ✅ Using the Jenkins official docker repository image, Locale and Timezone are not Korea setting. https://hub.docker.com/r/jenkins/jenkins
- So I used https://hub.docker.com/r/leechungkyu/jenkins image.
This is an image with Locale and Timezone related to Korea setting added to the existing official Dockerfile. Related Facebook Links
$ cat Dockerfile
... Skip
# Set the locale ko_KR.UTF-8
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y locales
RUN sed -i -e 's/# ko_KR.UTF-8 UTF-8/ko_KR.UTF-8 UTF-8/' /etc/locale.gen && \
dpkg-reconfigure --frontend=noninteractive locales && \
update-locale LANG=ko_KR.UTF-8
ENV LANG ko_KR.UTF-8
RUN locale-gen ko_KR.UTF-8
ENV LANG ko_KR.UTF-8
ENV LANGUAGE ko_KR.UTF-8
ENV LC_ALL ko_KR.UTF-8
# Set TimeZone Seoul
RUN ln -sf /usr/share/zoneinfo/Asia/Seoul /etc/localtime
... Skip
Author And Source
この問題について(Install Jenkins (docker based)), 我々は、より多くの情報をここで見つけました https://qiita.com/leechungkyu/items/27f5d3e48f04600a6657著者帰属:元の著者の情報は、元のURLに含まれています。著作権は原作者に属する。
Content is automatically searched and collected through network algorithms . If there is a violation . Please contact us . We will adjust (correct author information ,or delete content ) as soon as possible .