Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated Docker File #14

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

hari-gopalakrishnan
Copy link

FROM ubuntu:20.04
ENV TZ=Asia/Kolkata
DEBIAN_FRONTEND=noninteractive

RUN apt-get update &&
apt-get install -qy tzdata

LABEL maintainer="Bibin Wilson bibinwilsonn@gmail.com"

Make sure the package repository is up to date.

RUN apt-get update &&
apt-get -qy full-upgrade &&
apt-get install -qy git && \

Install a basic SSH server

apt-get install -qy openssh-server && \
sed -i 's|session    required     pam_loginuid.so|session    optional     pam_loginuid.so|g' /etc/pam.d/sshd && \
mkdir -p /var/run/sshd && \

Install JDK 8 (latest stable edition at 2019-04-01)

apt-get install -qy openjdk-11-jdk && \

Install maven

apt-get install -qy maven && \

Cleanup old packages

apt-get -qy autoremove && \

Add user jenkins to the image

adduser jenkins --gecos "First Last,RoomNumber,WorkPhone,HomePhone" --disabled-password && \

Set password for the jenkins user (you may want to alter this).

echo "jenkins:jenkins" | chpasswd && \
mkdir /home/jenkins/.m2

#ADD settings.xml /home/jenkins/.m2/

Copy authorized keys

COPY .ssh/authorized_keys /home/jenkins/.ssh/authorized_keys

RUN chown -R jenkins:jenkins /home/jenkins/.m2/ &&
chown -R jenkins:jenkins /home/jenkins/.ssh/

Standard SSH port

EXPOSE 22

CMD ["/usr/sbin/sshd", "-D"]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant