Skip to content

ravindernegi/docker-ubuntu-container

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

1 Commit
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🐳 Ubuntu Docker Container

This project sets up an Ubuntu 22.04 environment using Docker and Docker Compose. It's useful for development, testing, or sandboxing inside a lightweight container.


πŸ“ Folder Structure

ubuntu-container/ β”œβ”€β”€ Dockerfile β”œβ”€β”€ docker-compose.yml β”œβ”€β”€ README.md └── data/ # Optional - Shared volume between host and container


πŸš€ How to Run

1. Build and Start the Container

docker compose up --build

or

docker compose up --build -d

This will:

  • Build the Docker image from the Dockerfile
  • Start a container named ubuntu_container
  • Mount the ./data folder to /home/devuser/data in the container

2. Access the Container Shell

docker exec -it ubuntu_container bash

3. Stop and Remove the Container

To stop and clean up the container:

docker compose down

Default User

Username Password
devuser devpass

Installed Packages sudo, curl, wget, git, vim, nano, python3, python3-pip

You can add more tools by editing the Dockerfile.

Shared Volume The data/ directory on your host is mounted to:

/home/devuser/data

About

Create container for ubuntu

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published