grim/containers/oauth-kludge

Add a dockerfile and convey.yml

2020-11-22, Gary Kramlich
ff4a8174d97b
Parents cfb3a5d491b7
Children c60e307d4293
Add a dockerfile and convey.yml
  • +20 -0
    Dockerfile
  • +43 -0
    convey.yml
  • --- /dev/null Thu Jan 01 00:00:00 1970 +0000
    +++ b/Dockerfile Sun Nov 22 03:55:54 2020 -0600
    @@ -0,0 +1,20 @@
    +FROM golang:1.15 AS build
    +
    +RUN set -ex && \
    + apt-get update && \
    + apt-get install -y --no-install-recommends ca-certificates && \
    + apt-get clean && \
    + rm -rf /var/lib/apt/lists
    +
    +COPY . /oauth-kludge
    +
    +WORKDIR /oauth-kludge
    +
    +RUN CGO_ENABLED=0 go build -ldflags '-w -extldflags "-static"'
    +
    +FROM scratch
    +
    +COPY --from=build /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
    +COPY --from=build /oauth-kludge/oauth-kludge /oauth/kludge
    +
    +CMD ["/oauth-kludge"]
    --- /dev/null Thu Jan 01 00:00:00 1970 +0000
    +++ b/convey.yml Sun Nov 22 03:55:54 2020 -0600
    @@ -0,0 +1,43 @@
    +environment:
    + - REPO=rwgrim/oauth-kludge
    + - 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
    +