This is a simple Docker example project that demonstrates how to build and run a basic Ubuntu container and execute a simple script.
. ├── .cnb.yml # Build configuration file └── docker/ ├── Dockerfile # Docker image definition └── setup.sh # Script executed in the container
This project creates a Docker container based on Ubuntu 18.04 and executes a simple script in the container that outputs a "hello" message.
docker build -t hello-docker -f docker/Dockerfile .
docker run --rm hello-docker /app/setup.sh
The project includes a .cnb.yml configuration file that can be used for automated build and deployment processes. This configuration specifies using docker/Dockerfile for building and uses the docker/setup.sh script during the build process.
You can customize the project by modifying the following files:
docker/Dockerfile: Change the base image or add more build stepsdocker/setup.sh: Modify the operations performed when the container starts