Skip to content
Snippets Groups Projects
Commit 41c7d3a3 authored by Will McCutchen's avatar Will McCutchen
Browse files

Build docker image in CI

parent 22de8317
No related branches found
No related tags found
No related merge requests found
...@@ -29,11 +29,14 @@ jobs: ...@@ -29,11 +29,14 @@ jobs:
- name: Build - name: Build
run: make build run: make build
- name: Build docker image
run: make image
- name: Lint - name: Lint
run: make lint run: make lint
- name: Test - name: Test
run: git show && make testci run: git show --stat && make testci
- name: Code coverage - name: Code coverage
uses: codecov/codecov-action@v1 uses: codecov/codecov-action@v1
......
# syntax = docker/dockerfile:1-experimental
FROM golang:1.16 FROM golang:1.16
WORKDIR /go/src/github.com/mccutchen/go-httpbin WORKDIR /go/src/github.com/mccutchen/go-httpbin
...@@ -6,7 +7,8 @@ WORKDIR /go/src/github.com/mccutchen/go-httpbin ...@@ -6,7 +7,8 @@ WORKDIR /go/src/github.com/mccutchen/go-httpbin
RUN cd /tmp && go get -u github.com/kevinburke/go-bindata/... RUN cd /tmp && go get -u github.com/kevinburke/go-bindata/...
COPY . . COPY . .
RUN make build buildtests RUN --mount=type=cache,id=gobuild,target=/root/.cache/go-build \
make build buildtests
FROM gcr.io/distroless/base FROM gcr.io/distroless/base
COPY --from=0 /go/src/github.com/mccutchen/go-httpbin/dist/go-httpbin* /bin/ COPY --from=0 /go/src/github.com/mccutchen/go-httpbin/dist/go-httpbin* /bin/
......
...@@ -142,7 +142,7 @@ gcloud-auth: ...@@ -142,7 +142,7 @@ gcloud-auth:
# docker images # docker images
# ============================================================================= # =============================================================================
image: image:
docker build -t $(DOCKER_TAG_DOCKERHUB) . DOCKER_BUILDKIT=1 docker build -t $(DOCKER_TAG_DOCKERHUB) .
imagepush: image imagepush: image
docker push $(DOCKER_TAG_DOCKERHUB) docker push $(DOCKER_TAG_DOCKERHUB)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment