Initial commit
First container (for gitea)
This commit is contained in:
@@ -0,0 +1,66 @@
|
||||
# What this is
|
||||
|
||||
Scripts and dockerfiles to build docker images based on Gentoo, but only with
|
||||
what is needed at runtime, i.e., without the build time dependencies.
|
||||
|
||||
I use some non-standard profiles that strip what is not needed.
|
||||
|
||||
# How to use it
|
||||
|
||||
First copy the portage trunk in repo/gentoo/ and the ceamac trunk - miniroot
|
||||
branch in repo/ceamac/.
|
||||
|
||||
Then run src/bootstrap.sh -h and see what it says.
|
||||
|
||||
## Build locally (to test what goes in)
|
||||
|
||||
For example:
|
||||
|
||||
`src/bootstrap.sh -us -r repos/gentoo -r repos/ceamac output -a`
|
||||
|
||||
- -u to build unstable.
|
||||
- -s to add support for steve.
|
||||
- -r repo-name-or-path to add whatever repos you need. gentoo is added by
|
||||
default, even if not specified.
|
||||
- output - this can be any name, it is the name of the output directory where
|
||||
the --root will be.
|
||||
- optional extra arguments to emerge, added after output. For example use -a
|
||||
to see what would be merged before merging.
|
||||
|
||||
Other useful options:
|
||||
- -p profile to specify a profile (if not used, it will be asked)
|
||||
- -m make.conf to specify an alternate make.conf to be copied in $ROOT
|
||||
- -c yes to clear the output directory and rebuild all. Without -c, the build
|
||||
will continue and reuse the last selected profile.
|
||||
- -e used together with -c to simply clean all and not build anything.
|
||||
|
||||
After finishing, if all goes well, you should have a ready to use $ROOT in
|
||||
output as well as some useful scripts in bin, like bin/output-emerge to emerge
|
||||
more packages in output, bin/output-eselect to run eselect in $ROOT and
|
||||
bin/output-bwrap to start a bubblewrap shell inside $ROOT and test stuff.
|
||||
|
||||
This bootstrap script will create only a base root (@system set, without
|
||||
anything else).
|
||||
|
||||
To continue run scripts from src or manually emerge stuff.
|
||||
|
||||
For example `src/setup-gitea.sh output [-a]` to install gitea inside output.
|
||||
|
||||
Important note: host portage should have the same trunk as $ROOT, because
|
||||
that's where BDEPENDs go. In case of mismatches things can go wrong.
|
||||
|
||||
## Build with docker
|
||||
|
||||
Edit the dockerfiles and run docker build. I did not add arguments.
|
||||
|
||||
Unfortunately docker build does not support steve.
|
||||
|
||||
For example:
|
||||
|
||||
Build the base image with
|
||||
`docker buildx build -t gentoo-base-gnu -f Dockerfile.base.gnu .`
|
||||
|
||||
The build the gitea image with
|
||||
`docker buildx build -t gentoo-gitea -f Dockerfile.gitea .`
|
||||
|
||||
It uses the base image. And the dockerfile copies the repos from repos/.
|
||||
Reference in New Issue
Block a user