baseimage-docker

(β˜… 9,098)

A minimal Ubuntu base image modified for Docker-friendliness

  • .editorconfig
  • .gitignore
  • build-multiarch.sh
  • build.sh
  • Changelog.md
  • CODE_OF_CONDUCT.md
  • CONTRIBUTING.md
  • install-tools.sh
  • LICENSE.txt
  • Makefile
  • README.md
  • README_ZH_cn_.md
  • README_zh_tw.md
  • Vagrantfile

# Installation Guide

1. Get the code
git clone https://github.com/phusion/baseimage-docker

Downloads the entire project code from GitHub to your computer.

cd baseimage-docker

Moves into the project folder you just downloaded.

2. Docker

Easy Recommended
Prerequisites
  • Git Needed to download the project code from GitHub.
  • Docker Desktop Needed to build and run containers. Install it and keep it running in the background.
docker build --build-arg BASE_IMAGE=ubuntu:26.04 --build-arg INSTALL_GNU_COREUTILS=1 image/

Builds a runnable image based on the Dockerfile.

* [The `docker-ssh` tool](#docker_ssh)

Type this command into your terminal and run it.

docker run --rm -t -i phusion/baseimage:<VERSION> /sbin/my_init -- bash -l

Runs the built image as an actual container.

$ docker run -t -i <YOUR_NAME_IMAGE> /sbin/my_init -- bash -l

Runs the built image as an actual container.

$ docker run -t -i \

Runs the built image as an actual container.

βœ… Run docker compose ps to check the containers are Up. If the README mentions a port, open http://localhost:PORT in your browser.

Pulled directly from this repo's README.

3. Make

Medium
Prerequisites
  • Git Needed to download the project code from GitHub.
  • Make Usually pre-installed on Linux/macOS. On Windows, install separately (e.g. via MSYS2 or WSL).
make build BASE_IMAGE=ubuntu:24.04

Compiles the code based on the generated build configuration to produce an executable.

make build

Compiles the code based on the generated build configuration to produce an executable.

make build NAME=joe/baseimage

Compiles the code based on the generated build configuration to produce an executable.

make build BASE_IMAGE=debian:stretch

Compiles the code based on the generated build configuration to produce an executable.

make build BASE_IMAGE=debian:stretch NAME=joe/stretch

Compiles the code based on the generated build configuration to produce an executable.

βœ… If it finishes without errors, it worked. Try running the generated executable directly.

Pulled directly from this repo's README.

// repository documentation