What is Dockerfile and how to create one from scratch

Hi guys,

In this post we will cover:

  • What is Dockerfile
  • How to create one from scratch
  • How to create an image from Dockerfile
  • How to hack the vulnerable container created

Dockerfile Instructions

FROM debian
RUN echo “root:Passw0rd!” | chpasswd
RUN apt-get update
RUN apt-get install -y wget perl libnet-ssleay-perl openssl libauthen-pam-perl libpam-runtime libio-pty-perl apt-show-versions python; exit 0
RUN rm /var/lib/dpkg/info/apt-show*
RUN apt-get install -y apt-show-versions
RUN wget http://prdownloads.sourceforge.net/webadmin/webmin_1.900_all.deb
RUN dpkg -i webmin_1.900_all.deb
ENTRYPOINT service webmin restart && /bin/bash

in 4th line in your description, you forgot to add ; exit 0

1 Like