Make static builds easy!🐧 You can use it right from Docker!🐳
The default password is staticnux
. 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-staticnux-linux-musl-gcc --version
x86_64-staticnux-linux-musl-gcc (StaticNux 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/StaticNux-1.0.0.tar.gz | docker import - staticnux:1.0.0
docker run --name staticnux --tmpfs /tmp -d -dit -p 8022:22 -i -t --restart always staticnux:1.0.0 /linuxrc
docker attach staticnux
ssh root@127.0.0.1 -p 8022
- 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)