- Notifications
You must be signed in to change notification settings - Fork6
innovarew/docker-tinycore
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Docker from scratch image ofTinycore Linux
To build on top of it, just pull from thedocker-tinycore package
echo FROM ghcr.io/innovarew/docker-tinycore > Dockerfiledocker build -t docker-tinycore-scratch .
To run, justdocker run
as show below:
sudo docker run -it ghcr.io/innovarew/docker-tinycore:latest
To build locally, justmake
as show below:
# prepare the rootfs, build, and run the containersudo make TC_URL=http://tinycorelinux.net/15.x/x86_64/
Ready to use docker images fromdocker-tinycore (see link on how-to use):
Release/Arch | Docker Image |
---|---|
latest | FROM ghcr.io/innovarew/docker-tinycore:latest |
15.x-x86_64 | FROM ghcr.io/innovarew/docker-tinycore:15.x-x86_64 |
14.x-x86_64 | FROM ghcr.io/innovarew/docker-tinycore:14.x-x86_64 |
14.x-x86 | FROM ghcr.io/innovarew/docker-tinycore:14.x-x86 |
13.x-x86_64 | FROM ghcr.io/innovarew/docker-tinycore:13.x-x86_64 |
12.x-x86_64 | FROM ghcr.io/innovarew/docker-tinycore:12.x-x86_64 |
11.x-x86_64 | FROM ghcr.io/innovarew/docker-tinycore:11.x-x86_64 |
10.x-x86_64 | FROM ghcr.io/innovarew/docker-tinycore:10.x-x86_64 |
What goes on under the hood is shown below:
cat > Dockerfile <<EOFFROM scratchADD data/rootfs-x86_64-15.x.tar.xz /EOF# unpack tinycore rootfs, sudo needed to unpack cpio proper permssudo scripts/tc-docker tce_rootfs_init data/# build and run the tinycore docker containersudo docker build -t docker-tinycore-local:latest .sudo docker run -it docker-tinycore-local:latest /bin/sh
tc-docker
provides the main functionalities for running tinycore on docker:
First, provides
tc-docker tce_rootfs_init
that extracts the rootfs of a tinycore ISO image.This rootfs, can then be used on aDockerfile
, usingFROM scratch
and adding the rootfs.Second, provides
tc-docker tce_install ext.tcz root/
, that fetches a ext.tcz and unpacks it underroot/
.This allows to installsquashfs-tools.tcz
, so the running container can useunsquashfs
to install tcz extensions into the designatedroot/
.Last, once tinycore
rootfs
, and,unsquashfs
are in place inside the container, thetce-load -wi whois
command can be used on the running container to install new extensions.
One limitation of this approach is that if for any reason theunsquashfs
stops working, saysquashfs-tools.tcz
or any of its dependences is removed then,tce-load
stops working, and the ability of installing new tce extensions is lost.
A benefit of using the TinyCore ISO image as source, is that extensions shipped inside the TinyCore ISO under<iso>/cde
are available, and can be provided as a docker volume to be used for shipping as offline extensions without requiring download.
About
TinyCore Linux on Docker