Public Repository

Last pushed: 3 months ago
Short Description
Ubuntu image for apache2 with ssh open port
Full Description

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

vim dockerfile

FROM ubuntu
MAINTAINER tanvir0102@gmail.com
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

Docker Pull Command
Owner
tanvir0102

Comments (0)