mirror of
https://github.com/kamranahmedse/developer-roadmap.git
synced 2025-08-26 10:34:40 +02:00
Add two beginner projects (#6689)
* add two beginner projects * Update src/data/projects/basic-dockerfile.md Correct 'build' to 'write' * Update src/data/projects/log-archive-tool.md
This commit is contained in:
39
src/data/projects/basic-dockerfile.md
Normal file
39
src/data/projects/basic-dockerfile.md
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
---
|
||||||
|
title: 'Basic Dockerfile'
|
||||||
|
description: 'Build a basic Dockerfile to create a Docker image.'
|
||||||
|
isNew: false
|
||||||
|
sort: 1
|
||||||
|
difficulty: 'beginner'
|
||||||
|
nature: 'CLI'
|
||||||
|
skills:
|
||||||
|
- 'docker'
|
||||||
|
- 'dockerfile'
|
||||||
|
- 'linux'
|
||||||
|
- 'devops'
|
||||||
|
seo:
|
||||||
|
title: 'Basic Dockerfile'
|
||||||
|
description: 'Write a basic Dockerfile to create a Docker image.'
|
||||||
|
keywords:
|
||||||
|
- 'basic dockerfile'
|
||||||
|
- 'dockerfile'
|
||||||
|
- 'docker'
|
||||||
|
roadmapIds:
|
||||||
|
- 'devops'
|
||||||
|
- 'docker'
|
||||||
|
---
|
||||||
|
|
||||||
|
In this project, you will write a basic Dockerfile to create a Docker image. When this Docker image is run, it should print "Hello, Captain!" to the console before exiting.
|
||||||
|
|
||||||
|
## Requirements
|
||||||
|
|
||||||
|
- 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.
|
||||||
|
|
||||||
|
|
||||||
|
You can learn more about writing a Dockerfile [here](https://docs.docker.com/engine/reference/builder/).
|
||||||
|
|
||||||
|
<hr />
|
||||||
|
|
||||||
|
If you are looking to build a more advanced version of this project, you can consider adding 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!".
|
45
src/data/projects/log-archive-tool.md
Normal file
45
src/data/projects/log-archive-tool.md
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
---
|
||||||
|
title: 'Log Archive Tool'
|
||||||
|
description: 'Build a tool to archive logs from the CLI.'
|
||||||
|
isNew: false
|
||||||
|
sort: 2
|
||||||
|
difficulty: 'beginner'
|
||||||
|
nature: 'CLI'
|
||||||
|
skills:
|
||||||
|
- 'linux'
|
||||||
|
- 'bash'
|
||||||
|
- 'shell scripting'
|
||||||
|
seo:
|
||||||
|
title: 'Log Archive Tool'
|
||||||
|
description: 'Build a tool to archive logs from the CLI.'
|
||||||
|
keywords:
|
||||||
|
- 'log archive tool'
|
||||||
|
- 'devops project idea'
|
||||||
|
roadmapIds:
|
||||||
|
- 'devops'
|
||||||
|
- 'linux'
|
||||||
|
---
|
||||||
|
|
||||||
|
In this project, you will build a tool to archive logs on a set schedule by compressing them and storing them in a new directory, this is especcially useful for removing old logs and keeping the system clean while maintaining the logs in a compressed format for future reference. This project will help you practice your programming skills, including working with files and directories, and building a simple cli tool.
|
||||||
|
|
||||||
|
The most common location for logs on a unix based system is `/var/log`.
|
||||||
|
|
||||||
|
## Requirements
|
||||||
|
|
||||||
|
The tool should run from the command line, accept the log directory as an argument, compress the logs, and store them in a new directory. The user should be able to:
|
||||||
|
|
||||||
|
- Provide the log directory as an argument when running the tool.
|
||||||
|
```bash
|
||||||
|
log-archive <log-directory>
|
||||||
|
```
|
||||||
|
- The tool should compress the logs in a tar.gz file and store them in a new directory.
|
||||||
|
- The tool should log the date and time of the archive to a file.
|
||||||
|
```bash
|
||||||
|
logs_archive_20240816_100648.tar.gz
|
||||||
|
```
|
||||||
|
|
||||||
|
You can learn more about the `tar` command [here](https://www.gnu.org/software/tar/manual/tar.html).
|
||||||
|
|
||||||
|
<hr />
|
||||||
|
|
||||||
|
If you are looking to build a more advanced version of this project, you can consider adding functionality to the tool like emailing the user updates on the archive, or sending the archive to a remote server or cloud storage.
|
Reference in New Issue
Block a user