DevOps Classroom notes 05/Sep/2026

create docker file (file name Dockerfile)

FROM nginx:latest
COPY ./2168_sweet_bakery/* /usr/share/nginx/html/

build image default file name (Dockerfile)

docker build -t sweet_bakery:1.0.0 .

build image different file name

docker build -t sweet_bakery:1.1.0 –file sweet_bakery.Dockerfile . docker build -t sweet_bakery:1.1.0 -f sweet_bakery.Dockerfile .

docker run -dit –name web -p 80:80 sweet_bakery:1.1.0

FROM ubuntu:latest

RUN apt-get update && apt-get install -y nginx zip

ADD https://www.tooplate.com/zip-templates/2168_sweet_bakery.zip /tmp/2168_sweet_bakery.zip

RUN unzip /tmp/2168_sweet_bakery.zip -d /tmp/

RUN  cp -rf /tmp/2168_sweet_bakery/* /usr/share/nginx/html/ && \
    rm /tmp/2168_sweet_bakery.zip

Task :

  1. create new image refer above dockerfile use apache2
Ubuntu / Debian/var/www/html/
CentOS / RHEL / Fedora/var/www/html/
macOS (Built-in)/Library/WebServer/Documents/
Windows (Apache/httpd)C:\Apache24\htdocs\
Windows (XAMPP)C:\xampp\htdocs\
docker exec -it <container id> /bin/bash

create dockerhub account

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Please turn AdBlock off
Animated Social Media Icons by Acurax Responsive Web Designing Company

Discover more from Direct DevOps from Quality Thought

Subscribe now to keep reading and get access to the full archive.

Continue reading

Visit Us On FacebookVisit Us On LinkedinVisit Us On Youtube