1
0
mirror of synced 2025-04-18 12:24:02 +03:00

Improve usage of build cache

This commit is contained in:
Marcel Waldvogel 2021-02-17 15:30:21 +01:00
parent db48141262
commit 340b964649
3 changed files with 8 additions and 4 deletions

View File

@ -4,3 +4,4 @@
/.git
/.gocache
/**/secrets
/keydump

2
.gitignore vendored
View File

@ -5,7 +5,9 @@
.gocache
.venv
/bin
/etc
/pkg
/keydump
__pycache__
debian/files
version-git-commit

View File

@ -2,7 +2,8 @@ FROM golang:buster as builder
RUN adduser builder --system --disabled-login
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update -qq && apt-get -y install build-essential postgresql-11 postgresql-server-dev-11 --no-install-recommends
COPY --chown=builder:root . /hockeypuck
COPY --chown=builder:root Makefile /hockeypuck/
COPY --chown=builder:root src /hockeypuck/src
ENV GOPATH=/hockeypuck
USER builder
WORKDIR /hockeypuck
@ -13,8 +14,8 @@ RUN cd src/hockeypuck && go install hockeypuck/server/cmd/...
FROM debian:buster-slim
RUN mkdir -p /hockeypuck/bin /hockeypuck/lib /hockeypuck/etc /hockeypuck/data
COPY --from=builder /hockeypuck/bin /hockeypuck/bin
COPY --from=builder /hockeypuck/contrib/templates /hockeypuck/lib/templates
COPY --from=builder /hockeypuck/contrib/webroot /hockeypuck/lib/www
COPY --from=builder /hockeypuck/contrib/docker-compose/devel/hockeypuck/bin/startup.sh /hockeypuck/bin
COPY contrib/templates /hockeypuck/lib/templates
COPY contrib/webroot /hockeypuck/lib/www
COPY contrib/docker-compose/devel/hockeypuck/bin/startup.sh /hockeypuck/bin/
VOLUME /hockeypuck/etc /hockeypuck/data
CMD ["/hockeypuck/bin/startup.sh"]