open-nomad/demo/countdash/counter-dashboard/Dockerfile
Seth Hoenig 334d2abb20 demo: create build scripts for our countdash demo
We use the education team's "countdash" demo in many places
to showcase Nomad's Consul Connect integration. This change
adds a Dockerfile for each of `counter-dashboard` and
`counter-api` that can be used to build artifacts to publish
to Nomad's Docker Hub organization.

The recent "0.0.3" release of the `countdash` demo includes
changes we want in order to demo task group service checks.
2020-04-22 12:30:26 -06:00

27 lines
643 B
Docker

FROM golang:alpine as builder
WORKDIR /build
ADD ./Dockerfile /build
RUN apk add git && \
git clone -b 0.0.3 https://github.com/hashicorp/demo-consul-101.git
WORKDIR /build/demo-consul-101/services/dashboard-service
ADD ./go.mod .
RUN go version && \
go env && \
go generate && \
GO111MODULE=on go run github.com/GeertJohan/go.rice/rice embed-go && \
GO111MODULE=on CGO_ENABLED=0 GOOS=linux go build
FROM alpine:latest
MAINTAINER nomadproject.io
WORKDIR /opt
COPY --from=builder /build/demo-consul-101/services/dashboard-service/counter-dashboard /opt
EXPOSE 9002
ENV PORT 9002
ENTRYPOINT ["/opt/counter-dashboard"]