diff options
author | 2020-03-18 03:55:30 +0100 | |
---|---|---|
committer | 2020-03-18 03:55:30 +0100 | |
commit | ef2794e3cac14bf3e716f89a178ee15138e1aa62 (patch) | |
tree | 9ba24bb8a704d1053366cac27b24eb0829e292b5 /Dockerfile.updater | |
download | soko-ef2794e3cac14bf3e716f89a178ee15138e1aa62.tar.gz soko-ef2794e3cac14bf3e716f89a178ee15138e1aa62.tar.bz2 soko-ef2794e3cac14bf3e716f89a178ee15138e1aa62.zip |
Initial commit containing v0.1.0 of Soko
This is a rewrite of packages.g.o based on postgres and git
written in Go.
Signed-off-by: Max Magorsch <arzano@gentoo.org>
Diffstat (limited to 'Dockerfile.updater')
-rw-r--r-- | Dockerfile.updater | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/Dockerfile.updater b/Dockerfile.updater new file mode 100644 index 0000000..cdecdad --- /dev/null +++ b/Dockerfile.updater @@ -0,0 +1,27 @@ +FROM golang:1.14.0 AS builder +WORKDIR /go/src/soko +COPY . /go/src/soko +RUN go get github.com/go-pg/pg/v9 +RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a -o bin . + + +FROM gentoo/stage3-amd64 as gentoobuilder +# Need a portage tree to build, use last nights. +COPY --from=gentoo/portage:latest /var/db/repos/gentoo /var/db/repos/gentoo +# Sandbox doesn't work well in docker. +ENV FEATURES="-userpriv -usersandbox -sandbox" +ENV USE="-bindist" +RUN emerge -C openssh +RUN emerge --quiet-build dev-vcs/git +RUN echo 'FEATURES="-userpriv -usersandbox -sandbox"' >> /etc/portage/make.conf +RUN rm -rf /var/db/repos/gentoo + + +FROM scratch +COPY --from=gentoobuilder / / +COPY --from=builder /go/src/soko/assets /go/src/soko/assets +COPY --from=builder /go/src/soko/bin /go/src/soko/bin +COPY --from=builder /go/src/soko/pkg /go/src/soko/pkg +COPY --from=builder /go/src/soko/web /go/src/soko/web +WORKDIR /go/src/soko +ENTRYPOINT ["/go/src/soko/bin/update.sh"] |