https://github.com/torshin5ergey/roadmapsh-basic-dockerfile
This is my solution to the Basic Dockerfile project in the DevOps roadmap from roadmap.sh
https://github.com/torshin5ergey/roadmapsh-basic-dockerfile
devops docker dockerfile linux
Last synced: 6 months ago
JSON representation
This is my solution to the Basic Dockerfile project in the DevOps roadmap from roadmap.sh
- Host: GitHub
- URL: https://github.com/torshin5ergey/roadmapsh-basic-dockerfile
- Owner: torshin5ergey
- Created: 2025-03-27T18:17:53.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2025-03-27T21:08:11.000Z (7 months ago)
- Last Synced: 2025-03-27T21:35:39.787Z (7 months ago)
- Topics: devops, docker, dockerfile, linux
- Language: Dockerfile
- Homepage:
- Size: 0 Bytes
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ๐ Basic Dockerfile Project for roadmap.sh
This is my solution to the [Basic Dockerfile project](https://roadmap.sh/projects/basic-dockerfile) in the [DevOps roadmap](https://roadmap.sh/devops) from [roadmap.sh](https://roadmap.sh/).
## Projecr Requirements
[Dockerfile reference](https://docs.docker.com/reference/dockerfile/)
- Write a basic Dockerfile to create Docker image
- The Dockerfile should be named Dockerfile.
- The Dockerfile should be in the root directory of the project.
- The base image should be alpine:latest.
- The Dockerfile should contain a single instruction to print โHello, Captain!โ to the console before exiting.
- *Advanced*. Add the ability to pass your name to the Docker image as an argument, and have the Docker image print `Hello, [your name]!` instead of `Hello, Captain!`.## Prerequisites
You need to have [Docker](https://www.docker.com/) installed on your system.
## Usage
1. Clone repository
```bash
git clone https://github.com/torshin5ergey/roadmapsh-basic-dockerfile.git
cd roadmapsh-basic-dockerfile
```2. Build Dockerfile
```bash
docker build -t basic-dockerfile .
```3. Run builed Docker image
```bash
docker run --rm basic-dockerfile
# output
Hello, Captain!
```4. *Advanced*. Run with ability to pass your name to the Docker image as an argument, and have the Docker image print `Hello, [your name]!` instead of `Hello, Captain!`.
```bash
docker run --rm basic-dockerfile Sergey
# output
Hello, Sergey!
```## Author
Sergey Torshin [@torshin5ergey](https://github.com/torshin5ergey)