-
Notifications
You must be signed in to change notification settings - Fork 0
/
011.go.buildah
40 lines (39 loc) · 1.95 KB
/
011.go.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
FROM crucible.lab:4000/oci/libressl:latest
ARG REPO="https://server.lab/git"
ARG NAME="go"
ARG URI="crucible.lab:4000/oci/libressl"
ARG NAMESPACE="nulllabs"
LABEL $NAMESPACE.build-date="$BDATE" \
$NAMESPACE.name="$NAME" \
$NAMESPACE.maintainer="[email protected]" \
$NAMESPACE.description="Base container for go." \
$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 --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="GOPATH,GOBIN"
ENV GOPATH="/root/.go" \
GOBIN="/root/.go/bin" \
GENESIS="$GENESISARG" \
SELF="$SELFARG"
RUN mkdir $HOME/.go \
&& printf 'FEATURES="-usersandbox"\n' >> /etc/portage/env/nousersandbox.conf \
&& printf 'dev-lang/go nousersandbox.conf\n' >> /etc/portage/package.env \
&& emerge dev-lang/go \
&& $HOME/.build/rsync.sh \
&& emerge --depclean --with-bdeps=n
ENTRYPOINT ["/bin/bash"]