Update tags

master
eater 6 years ago
parent a01c0973a3
commit bc3fd88bf6
Signed by: eater
GPG Key ID: 656785D50BE51C0A

@ -1,3 +1,4 @@
MAINTAINER?==@eater.me
# Name of image
IMAGE?=d.xr.to/base
# Arch to be used
@ -35,6 +36,7 @@ endif
default: all
vars:
@echo MAINTAINER=$(MAINTAINER)
@echo IMAGE=$(IMAGE)
@echo ARCH=$(ARCH)
@echo REPO_ROOT=$(REPO_ROOT)
@ -72,7 +74,7 @@ ifeq ($(TOOLBOX),busybox)
# Create busybox symlinks
xbps-uchroot $(BUILDDIR) /bin/busybox -- --list | while read i; do [ -e $(BUILDDIR)/usr/bin/$$i ] || ln -s /bin/busybox $(BUILDDIR)/usr/bin/$$i; done
endif
# Remove xbps cache dir
# Remove xbps cache dir
rm -rf $(BUILDDIR)/var/cache/xbps
# Import custom bashrc
cp files/bashrc.bash $(BUILDDIR)/etc/bash/bashrc.d/docker.sh
@ -87,7 +89,7 @@ endif
install: build
# Import directory as tar (owned by root) into docker
tar --owner 0 --group 0 -pC $(BUILDDIR) -c . | docker import - $(IMAGE)
tar --owner 0 --group 0 -pC $(BUILDDIR) -c . | docker import -m '$(IMAGE) initialization from chroot' -c 'LABEL maintainer="$(MAINTAINER)"' - $(IMAGE)
clean:
# Remove build directory

@ -5,27 +5,60 @@ This is the base image for the d.xr.to repo.
This image is a slimmed down version of the [`voidlinux/voidlinux-musl`](https://hub.docker.com/r/voidlinux/voidlinux-musl) image, from 66MB (or if you build an up-to-date image, 128MB), to no more than 20MB
# Packages
# Docker
The packages included are `toybox`, `xbps` and `bash`, also is `ncurses-base` included for the terminfo files.
```
# For the base install with toybox
docker pull d.xr.to/base
docker pull d.xr.to/base:toybox
# With the busybox toolbox
docker pull d.xr.to/base:busybox
# With the default toolbox
docker pull d.xr.to/base:default
# No toolbox
docker pull d.xr.to/base:none
```
# Toolboxes
There are 4 variants of the base image, all with different or no toolboxes, when none is provided `toybox` is used, when an empty string is provided `none` is used.
the `TOOLBOX` variable is used to specify which toolbox should be used
## `toybox`
Uses toybox for core utils, more info about toybox can be found here: https://landley.net/toybox/about.html
## `busybox`
Uses busybox for core utils, more info about busybox can be found here: https://www.busybox.net/
## `default`
Uses the default core utils, installed with a normal install of VoidLinux, the packages used are: `findutils`, `coreutils`, `diffutils`, `gawk`, `which`, `sed`, `gzip`, `file`, and `grep`
## `none`
This should create a non-hostile but light weight base environment
No core utils are installed at all.
# Variables
```makefile
# Email address of maintainer
MAINTAINER?==@eater.me
# Name of image
IMAGE ?= d.xr.to/base
IMAGE?=d.xr.to/base
# Arch to be used
ARCH ?= x86_64-musl
ARCH?=x86_64-musl
# Repo root url to be used (/musl will be appended in case of musl based arch)
REPO_ROOT ?= https://alpha.de.repo.voidlinux.org/current
REPO_ROOT?=https://alpha.de.repo.voidlinux.org/current
# Absolute repo url
REPO ?= $(REPO_ROOT)$(if $(findstring musl, $(ARCH)),/musl)
REPO?=$(REPO_ROOT)$(if $(findstring musl, $(ARCH)),/musl)
# Toolbox to be used (toybox, busybox, none or default)
TOOLBOX?=toybox
# Packages to install
PACKAGES ?= toybox xbps bash ncurses-base
PACKAGES?=xbps bash ncurses-base
# Directory where chroot should be build
BUILDDIR ?= $(PWD)/build
BUILDDIR?=$(PWD)/build
```
# Building

@ -0,0 +1,8 @@
#!/usr/bin/env bash
IMAGE="${1:-d.xr.to/base}";
MAINTAINER="${2:-=@eater.me}";
for toolbox in "none" "toybox" "busybox" "default"; do
make IMAGE="${IMAGE}:${toolbox}" TOOLBOX="${toolbox}";
done
docker tag "${IMAGE}:toybox" "${IMAGE}:latest";
Loading…
Cancel
Save