1234567891011121314151617181920212223242526272829303132333435 |
- FROM docker.infra.flowdat.com/fd3/sf-php:latest
- ENV DEBIAN_FRONTEND noninteractive
- ENV NOTVISIBLE "in users profile"
- EXPOSE 22 80/tcp 37 69/udp 123/udp
- COPY sshd_config /etc/ssh/sshd_config
- COPY . /etc/supervisord
- WORKDIR /opt
- RUN echo Acquire::http::Proxy "http://aptcache.infra.flowdat.com/"; > /etc/apt/apt.conf.d/00aptproxyi; \
- apt-get update; \
- apt-get install -yq parallel lockfile-progs expect telnet atftp atftpd xinetd busybox \
- sudo cron patch openssh-server; \
- pip install supervisor; \
- mkdir -p /var/log/supervisor/; \
- mkdir /var/run/sshd; \
- sed 's@session\s*required\s*pam_loginuid.so@session optional pam_loginuid.so@g' -i /etc/pam.d/sshd; \
- echo "export VISIBLE=now" >> /etc/profile; \
- mkdir -p /etc/ssh/keys/; \
- cp keys/bitbucket.id_rsa.pub /etc/ssh/keys/authorized_keys; \
- cp keys/bitbucket.id_rsa /etc/ssh/keys/bitbucket.id_rsa; \
- chmod 0600 /etc/ssh/keys; \
- chmod 0600 /etc/ssh/keys/authorized_keys; \
- chown root:root -R /etc/ssh/keys; \
- bash -c '/etc/supervisord/src/install-tftp.sh'; \
- bash -c '/etc/supervisord/src/install-tod.sh'; \
- touch /var/log/cron.log; \
- mkdir -p /tftpboot; \
- chmod 777 /tftpboot; \
- rm -rf /var/lib/apt/lists/*
- CMD ["sh", "-c", "busybox syslogd -n -O /dev/stdout & supervisord -c /etc/supervisord/supervisor.conf -n"]
|