You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
745B

  1. FROM golang:1.15-buster AS builder
  2. WORKDIR /usr/local/src
  3. #RUN apt update && apt install -y git
  4. RUN git clone https://github.com/cybozu-go/aptutil.git && \
  5. cd aptutil && \
  6. git checkout 3f82d83844818cdd6a6d7dca3eca0f76d8a3fce5
  7. WORKDIR /usr/local/src/aptutil
  8. RUN go mod download
  9. WORKDIR /usr/local/src/aptutil/cmd/go-apt-cacher
  10. RUN go build
  11. RUN find .
  12. FROM debian:buster-slim AS final
  13. COPY --from=builder /usr/local/src/aptutil/cmd/go-apt-cacher/go-apt-cacher /usr/local/bin/go-apt-cacher
  14. ADD ./go-apt-cacher.toml /etc/go-apt-cacher.toml
  15. RUN chmod ugoa+rx /usr/local/bin/* && \
  16. mkdir -p /var/spool/go-apt-cacher && \
  17. chown nobody:nogroup /var/spool/go-apt-cacher
  18. USER nobody:nogroup
  19. ENTRYPOINT ["/usr/local/bin/go-apt-cacher"]