Cross Linux From Scratch (CLFS) is a project that provides you with step-by-step instructions for building your own customized Linux system entirely from source.
The default password is clfs
. This can be changed by editing CONFIG_ROOT_PASSWD
of config.mk
.
Ubuntu 20.04 is recommended.
sudo apt update
sudo apt install gcc g++ make wget
make download
make toolchain
$ out/tools/bin/x86_64-clfs-linux-musl-gcc --version
x86_64-clfs-linux-musl-gcc (CLFS x86_64 2021.09) 11.2.0
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
make system
make image
sudo su
cat out/images/CLFS-1.0.0.tar.gz | docker import - clfs:1.0.0
docker run --name clfs -d -i -t --restart always clfs:1.0.0 /bin/sh
docker attach clfs
- Go to 'GitHub Profile > Settings > Developer settings > Personal access tokens > Generate new token'.
https://github.com/settings/tokens/new - Check the checkboxes of
repo
,write:packages
,read:packages
, anddelete:packages
. - Use the terminal with root privileges.
- Execute the
docker login ghcr.io -u <GitHub_Username>
in Terminal. - When prompted for a password, enter the token generated in step 2.
- Execute the
docker images -a
in Terminal.
The image you just added is displayed. Note the 'IMAGE_ID'. docker tag <IMAGE_ID> ghcr.io/<GitHub_Username>/<IMAGE_NAME>:<TAG>
Execute the above command.<IMAGE_ID>
is the 'IMAGE_ID' you just wrote down.- Execute the command below to push to GitHub.
docker push ghcr.io/<GitHub_Username>/<IMAGE_NAME>:<TAG>
- If you go to 'Profile' on GitHub, you can see 'Packages' added.
Click the 'Packages' so that check published docker image.
Delete all containers and images :
sudo su
docker stop $(docker ps -a -q)
docker rm $(docker ps -a -q)
docker rmi -f $(docker images -q)