grim/hgkeeper

Add a Dockerfile and convey.yml

2019-05-03, Gary Kramlich
72c01f7b0eb2
Add a Dockerfile and convey.yml
  • +19 -0
    Dockerfile
  • +41 -0
    convey.yml
  • --- /dev/null Thu Jan 01 00:00:00 1970 +0000
    +++ b/Dockerfile Fri May 03 13:03:43 2019 -0500
    @@ -0,0 +1,19 @@
    +FROM golang:stretch as build
    +
    +WORKDIR /root
    +
    +COPY . .
    +
    +RUN CGO_ENABLED=0 GOOS=linux go build -a -ldflags '-extldflags "-static" -s' .
    +
    +FROM debian:stretch-slim
    +
    +RUN set -ex && \
    + apt-get update && \
    + apt-get install -y --no-install-recommends mercurial && \
    + apt-get clean && \
    + rm -rf /var/lib/apt/lists
    +
    +COPY --from=build /root/hgkeeper /usr/local/bin/hgkeeper
    +
    +CMD ["hgkeeper", "serve"]
    --- /dev/null Thu Jan 01 00:00:00 1970 +0000
    +++ b/convey.yml Fri May 03 13:03:43 2019 -0500
    @@ -0,0 +1,41 @@
    +environment:
    + - REPO=rwgrim/hgkeeper
    + - TAG=latest
    + - REGISTRY=docker.io
    + - REGISTRY_USERNAME
    + - REGISTRY_PASSWORD
    +
    +tasks:
    + import:
    + type: docker/import
    + files: .:.
    +
    + build:
    + type: docker/build
    + dockerfile: Dockerfile
    + tag: ${REGISTRY}/${REPO}:${TAG}
    + files: .:.
    +
    + login:
    + type: docker/login
    + username: ${REGISTRY_USERNAME}
    + password: ${REGISTRY_PASSWORD}
    + server: ${REGISTRY}
    +
    + logout:
    + type: docker/logout
    + server: ${REGISTRY}
    +
    + push:
    + type: docker/push
    + images: ${REGISTRY}/${REPO}:${TAG}
    +
    +plans:
    + default:
    + stages:
    + - tasks: [import, build]
    + ci:
    + stages:
    + - tasks: [import, build, login, push]
    + - tasks: [logout]
    + run: always