0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Install Jenkins (docker based)

Last updated at Posted at 2020-01-18

banner-jenkins.png

💡 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

jenkins01.png

Plugin installation

Install by default and wait for the ProgressBar to complete.
jenkins02.png
jenkins03.png

Create admin account

Enter your account name (login ID), password, name, and email address.
jenkins04.png

Jenkins URL Setting

jenkins05.png

Start Jenkins

jenkins06.png

Note

$ 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
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?