You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
550 B
24 lines
550 B
|
6 years ago
|
FROM alpine:3.11.3
|
||
|
|
|
||
|
|
ARG go_pkg_url
|
||
|
|
|
||
|
|
RUN apk add --update alpine-sdk linux-headers cmake openssh curl
|
||
|
|
|
||
|
|
|
||
|
|
RUN adduser -D -s /bin/ash jenkins && \
|
||
|
|
passwd -u jenkins && \
|
||
|
|
ssh-keygen -A && \
|
||
|
|
mkdir /home/jenkins/.ssh && \
|
||
|
|
chown -R jenkins:jenkins /home/jenkins
|
||
|
|
|
||
|
|
RUN curl -s $go_pkg_url -o go.tar.gz && \
|
||
|
|
tar -C /usr/local -xzf go.tar.gz
|
||
|
|
|
||
|
|
COPY authorized_keys /home/jenkins/.ssh/authorized_keys
|
||
|
|
RUN chown -R jenkins:jenkins /home/jenkins/.ssh && \
|
||
|
|
chmod 600 /home/jenkins/.ssh/authorized_keys
|
||
|
|
|
||
|
|
EXPOSE 22
|
||
|
|
CMD ["/usr/sbin/sshd", "-D"]
|
||
|
|
|