Skip to content

Docker Summary

Arda Saygan edited this page May 6, 2025 · 1 revision

🐳 Docker Summary

Docker is a platform for building and running containerized applications, where a container packages your source code, dependencies, and runtime environment into a self-contained unit that can run anywhere a container runtime is available.

A Docker image is required to launch a container. This image defines the initial filesystem state and is built using a Dockerfile, which consists of sequential instructions in the form:

# comments
INSTRUCTION arguments

Common instructions include:

  • FROM: base image
  • COPY: copy files into the container
  • RUN: execute commands during image build

Two key instructions for container behavior are:

  • ENTRYPOINT: specifies the main command to run when the container starts
  • CMD: provides default arguments for the entrypoint

🛠️ Building and Running a Dockerized React App

We have dockerized our frontend app and published on DockerHub, here is the link. To experience Docker at first-hand, you can clone the image file and build a container to run our application, and witness how practical containerization is!

To pull the image

docker pull ardasaygan77/frontned

to run it in a container

docker run -p 5173:5173 frontend

After this, our app can be found at http://localhost:5173


📚 Further Reading

Clone this wiki locally