-
Notifications
You must be signed in to change notification settings - Fork 0
/
000.labeltest.buildah
50 lines (49 loc) · 2.55 KB
/
000.labeltest.buildah
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
FROM crucible.lab:4000/oci/gentoo-stage3-amd64-hardened:latest
ARG REPO="https://server.lab/git"
ARG NAME="labeltest"
ARG URI="crucible.lab:4000/oci/portage"
ARG NAMESPACE="nulllabs"
ARG GBRANCH="master"
ARG REPOURL="https://server.home/git/NullLabs/oci"
ARG RSYNCURI="rsync://crucible.mgmt/gentoo-portage"
LABEL $NAMESPACE.build-date="$BDATE" \
$NAMESPACE.name="$NAME" \
$NAMESPACE.maintainer="[email protected]" \
$NAMESPACE.description="Base portage container from catalyst/stage3." \
$NAMESPACE.usage="https://$REPO/NullLabs/oci/src/master/$NAME/README.md" \
$NAMESPACE.url="https://$REPO/NullLabs/oci/src/master/$NAME/README.md" \
$NAMESPACE.vcs-url="https://services.home/git/NullLabs/oci/src/master/$NAME/" \
$NAMESPACE.vcs-ref="$GHEAD" \
$NAMESPACE.vendor="NullLabs" \
$NAMESPACE.version="beta-0.0.2" \
$NAMESPACE.schema-version="1.0" \
$NAMESPACE.docker.cmd="docker run -it --rm --name $NAMESPACE-$NAME --privileged -l $NAMESPACE.image=$URI $URI:latest" \
$NAMESPACE.docker.cmd.devel="docker run -it --name $NAMESPACE-$NAME-tmp --privileged -l $NAMESPACE.image=$URI --rm --entrypoint=/bin/bash $URI:latest" \
$NAMESPACE.docker.cmd.test="docker run --entrypoint=/usr/local/bin/test.sh $URI:latest" \
$NAMESPACE.docker.cmd.debug="docker exec -it $NAMESPACE-$NAME bash" \
$NAMESPACE.docker.cmd.help="docker exec -it $NAMESPACE-$NAME /usr/local/bin/entrypoint.sh --help" \
$NAMESPACE.docker.params="" \
$NAMESPACE.cri.cmd="" \
$NAMESPACE.cri.cmd.devel="podman --cgroup-manager cgroupfs run --entrypoint=/bin/bash $URI:latest" \
$NAMESPACE.cri.cmd.test="podman --cgroup-manager cgroupfs run --entrypoint=/usr/local/bin/test.sh $URI:latest" \
$NAMESPACE.cri.cmd.debug="" \
$NAMESPACE.cri.cmd.help="" \
$NAMESPACE.cri.params="PORTAGE_BINHOST,PORTDIR,PKGDIR,FEATURES,MAKEOPTS,EMERGE_DEFAULT_OPTS,GENTOO_MIRRORS,SSL_CERT_FILE,EDITOR,RSYNCURI"
ENV PORTAGE_BINHOST="https://172.23.255.254/generic/" \
PORTDIR="/usr/portage" \
PKGDIR="/usr/portage/packages/generic" \
FEATURES="binpkg-multi-instance" \
MAKEOPTS="-j$THREADS" \
EMERGE_DEFAULT_OPTS="-bgq --nospinner" \
GENTOO_MIRRORS="https://crucible.lab" \
SSL_CERT_FILE="/etc/ssl/certs/ca-certificates.crt" \
EDITOR="/usr/bin/vi" \
RSYNCURI=$RSYNCURI \
GENESIS="$GENESISARG" \
SELF="$SELFARG"
RUN printf "Test output genesis: $GENESISARG\n"
RUN printf "Test output self: $SELFARG\n"
RUN printf "Test output genesis environment variable: $GENESIS\n"
RUN printf "Test output self environment variable: $SELF\n"
RUN printf "Test output file assigned THREADS: $THREADS\n"
ENTRYPOINT ["/bin/bash"]