https://github.com/konstruktoid/container-ubuntu-build
Ubuntu Docker base image
https://github.com/konstruktoid/container-ubuntu-build
Last synced: 6 months ago
JSON representation
Ubuntu Docker base image
- Host: GitHub
- URL: https://github.com/konstruktoid/container-ubuntu-build
- Owner: konstruktoid
- Created: 2015-08-24T19:50:03.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2021-05-20T09:16:47.000Z (over 4 years ago)
- Last Synced: 2024-10-05T16:40:17.046Z (about 1 year ago)
- Language: Shell
- Size: 2.17 GB
- Stars: 3
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.adoc
Awesome Lists containing this project
README
= Debian and Ubuntu base image generator
If you're not using Docker, run `sudo sh buildeb.sh` to generate a Debian or Ubuntu base image on a Ubuntu or Debian host. +
It will use `debootstrap`, create a tar-file, generate the `Dockerfile` and add a SHA256 checksum of the created tar-file to a `ENV` in the `Dockerfile`. +
`buildeb.sh` will also add `.git` and any previously generated tar-files to `.dockerignore`.== Build and verify
`sudo sh buildeb.sh ` +For example:
```sh
$ sudo sh buildeb.sh focal http://archive.ubuntu.com/ubuntu "$(pwd)/buildarea"
$ docker build -t konstruktoid/ubuntu -f Dockerfile.focal .
$ docker run -t -i konstruktoid/ubuntu /bin/bash
```== Using Docker
```sh
docker build --no-cache -t konstruktoid/ubuntubuild -f Dockerfile .
docker run --privileged -v "$(pwd)":/opt/buildarea konstruktoid/ubuntubuild focal http://archive.ubuntu.com/ubuntu
```== Autobuild
```sh
docker run --privileged -v "$(pwd)":/opt/buildarea konstruktoid/ubuntubuild focal http://archive.ubuntu.com/ubuntu
```== Recommended reading
https://securityblog.redhat.com/2014/12/18/before-you-initiate-a-docker-pull/[Before you initiate a “docker pull”] +
https://github.com/konstruktoid/Docker/blob/master/Security/CheatSheet.adoc[Docker Security Cheat Sheet] +
http://www.infoq.com/news/2015/05/Docker-Image-Vulnerabilities[Security Vulnerabilities in Docker Hub Images] +
https://joeyh.name/blog/entry/docker_run_debian/[what does docker.io run -it debian sh run?]