https://github.com/emanuelefavero/docker-linux
A custom Docker image based on Ubuntu. Built for testing Linux in a containerized environment
https://github.com/emanuelefavero/docker-linux
bash containers docker linux scripts ubuntu
Last synced: 6 months ago
JSON representation
A custom Docker image based on Ubuntu. Built for testing Linux in a containerized environment
- Host: GitHub
- URL: https://github.com/emanuelefavero/docker-linux
- Owner: emanuelefavero
- License: mit
- Created: 2024-07-22T18:00:35.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-12-05T07:45:25.000Z (10 months ago)
- Last Synced: 2025-02-04T16:50:24.378Z (8 months ago)
- Topics: bash, containers, docker, linux, scripts, ubuntu
- Language: Shell
- Homepage:
- Size: 16.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Docker Linux
This is a custom Docker image based on Ubuntu. It a good starting point for testing Linux in a containerized environment.
## Installation
- Clone the repository
- Build the Docker image: `docker build -t ubuntu-custom .`
- Create a volume for persistent storage: `docker volume create ubuntu-root-volume`
- Run the Docker container with the volume: `docker run -it -v ubuntu-root-volume:/root ubuntu-custom`
- Test your Linux application: (e.g. by creating a file in the `/root` directory)> Tip: All files in the `/root` directory will be saved in the volume for persistent storage
>
> Note: Make sure you have Docker installed on your machine
>
> TIP: When saving files in the container, they will be lost when the container is stopped. To save files, use a volume or copy them to the Dockerfile directory so they are copied to the container during the next build## Usage
- Run the Docker container: `docker run -it --rm -v ubuntu-root-volume:/root ubuntu-custom`
- Test your Linux application: (e.g. by creating a file in the `/root` directory)> Tip: You could create an alias for the above docker command in your `.bashrc` or `.zshrc` file (e.g. `alias ubuntu='docker run -it --rm -v ubuntu-root-volume:/root ubuntu-custom'`)
> Tip: the `--rm` flag will automatically remove the container when it is stopped
> To delete a volume, use the command: `docker volume rm ubuntu-root-volume`## License
- [MIT](LICENSE.md)