grim/hgkeeper

Parents 2664db87766e
Children c9dc1d88840a
Overhaul Dockerfile and ignore /repos when building the image
  • +2 -0
    .dockerignore
  • +14 -4
    Dockerfile
  • --- /dev/null Thu Jan 01 00:00:00 1970 +0000
    +++ b/.dockerignore Wed Sep 11 01:31:53 2019 -0500
    @@ -0,0 +1,2 @@
    +repos/
    +
    --- a/Dockerfile Wed Sep 11 01:29:49 2019 -0500
    +++ b/Dockerfile Wed Sep 11 01:31:53 2019 -0500
    @@ -1,16 +1,26 @@
    -FROM golang:stretch as build
    +FROM golang:1.13-buster as build
    WORKDIR /root
    COPY . .
    -RUN CGO_ENABLED=0 GOOS=linux go build -a -ldflags '-extldflags "-static" -s' .
    +RUN go get -u github.com/mjibson/esc && \
    + go generate ./... && \
    + CGO_ENABLED=0 GOOS=linux go build -a -ldflags '-extldflags "-static" -s' .
    -FROM debian:stretch-slim
    +FROM debian:buster-slim
    RUN set -ex && \
    apt-get update && \
    - apt-get install -y --no-install-recommends mercurial && \
    + apt-get install -y --no-install-recommends \
    + python libpython-dev python-pip python-setuptools build-essential \
    + openssh-client nvi \
    + && \
    + pip install --no-binary :all: mercurial hg-evolve && \
    + apt-get remove -y --purge \
    + libpython2.7-dev python-pip python-setuptools build-essential \
    + && \
    + apt-get autoremove --purge -y && \
    apt-get clean && \
    rm -rf /var/lib/apt/lists