Dockerfile.alpine 550 B

1234567891011121314151617181920212223
  1. FROM alpine:3.11.3
  2. ARG go_pkg_url
  3. RUN apk add --update alpine-sdk linux-headers cmake openssh curl
  4. RUN adduser -D -s /bin/ash jenkins && \
  5. passwd -u jenkins && \
  6. ssh-keygen -A && \
  7. mkdir /home/jenkins/.ssh && \
  8. chown -R jenkins:jenkins /home/jenkins
  9. RUN curl -s $go_pkg_url -o go.tar.gz && \
  10. tar -C /usr/local -xzf go.tar.gz
  11. COPY authorized_keys /home/jenkins/.ssh/authorized_keys
  12. RUN chown -R jenkins:jenkins /home/jenkins/.ssh && \
  13. chmod 600 /home/jenkins/.ssh/authorized_keys
  14. EXPOSE 22
  15. CMD ["/usr/sbin/sshd", "-D"]