Last active
August 19, 2019 16:26
-
-
Save yosshy/cc6c479ac5b1a1ac1774 to your computer and use it in GitHub Desktop.
Dockerfile for Ubuntu 14.04 with upstart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM ubuntu:14.04 | |
MAINTAINER Akira Yoshiyama <[email protected]> | |
ENV DEBIAN_FRONTEND noninteractive | |
RUN mkdir -p /etc/apt /var/run | |
ADD sources.list /etc/apt/sources.list | |
RUN rm /etc/apt/sources.list.d/* | |
RUN apt-get update | |
RUN apt-get install --reinstall -y openssh-server python-apt upstart sysvinit-utils | |
RUN mv /sbin/initctl.distrib /sbin/initctl | |
RUN groupadd ubuntu | |
RUN useradd -g ubuntu -G sudo ubuntu | |
RUN echo ubuntu:u | chpasswd | |
RUN cp -a /etc/skel /home/ubuntu | |
RUN chown -R ubuntu.ubuntu /home/ubuntu | |
RUN ln -sf /proc/mounts /etc/mtab | |
RUN echo "ubuntu ALL=(ALL:ALL) NOPASSWD: ALL" > /etc/sudoers.d/ubuntu | |
RUN update-rc.d rsyslog defaults | |
RUN update-rc.d ssh defaults | |
RUN mkdir /home/ubuntu/.ssh | |
RUN chown ubuntu.ubuntu /home/ubuntu/.ssh | |
RUN chmod 700 /home/ubuntu/.ssh | |
#RUN echo "<snip>" >> /home/ubuntu/.ssh/authorized_keys | |
RUN echo UseDNS=no >> /etc/ssh/sshd_config | |
ENV HOME /home/ubuntu | |
EXPOSE 22 389 636 3306 | |
ENTRYPOINT exec /sbin/init --startup-event=failsafe-boot |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment