What is a Dockerfile?
12 October 2023 (Updated 12 October 2023)
On this page
In a nutshell
The Dockerfile is a plain text file that contains all the commands needed to build a Docker image.
Example Dockerfile
# Specify base image
FROM ruby:3.2-slim
# Set the working directory in Docker
WORKDIR /app
# Copy the content of the local src directory to the working directory
COPY . .
# Specify the command to run on container start
CMD ["ruby", "./hello-docker.rb"]
Tagged:
Docker
Thanks for your comment 🙏. Once it's approved, it will appear here.
Leave a comment