Sign inSign up

tanvir0102/ubuntu-apache2

By tanvir0102

•Updated over 9 years ago

Ubuntu image for apache2 with ssh open port

Image
0

388

tanvir0102/ubuntu-apache2 repository overview

This Ubuntu image is configured with apache2 and ssh services and expose the respective ports.

vim dockerfile

FROM ubuntu MAINTAINER [email protected]⁠ RUN apt-get update -y RUN apt-get install openssh-server -y RUN apt-get install apache2 -y RUN mkdir /var/run/sshd RUN echo 'root:root' | chpasswd RUN sed -ri 's/^PermitRootLogin\s+.*/PermitRootLogin yes/' /etc/ssh/sshd_config RUN sed -ri 's/UsePAM yes/#UsePAM yes/g' /etc/ssh/sshd_config EXPOSE 22 EXPOSE 80 443 CMD ["nginx", "-g", "daemon off;"] CMD ["/usr/sbin/sshd","-D"]

:wq!

docker build -t tanvir0102/ubuntu-apache2 . docker images docker login -u tanvir0102 docker push tanvir0102/ubuntu-apache2

Tag summary

Content type

Image

Digest

Size

118.9 MB

Last updated

over 9 years ago

docker pull tanvir0102/ubuntu-apache2