Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update dependencies #7

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,11 @@ FROM curlimages/curl:latest as metrics
WORKDIR /metrics/
USER root
RUN mkdir -p /metrics/
RUN curl -o nats-exporter.tar.gz -L https://github.com/nats-io/prometheus-nats-exporter/releases/download/v0.9.1/prometheus-nats-exporter-v0.9.1-linux-amd64.tar.gz
RUN curl -o nats-exporter.tar.gz -L https://github.com/nats-io/prometheus-nats-exporter/releases/download/v0.12.0/prometheus-nats-exporter-v0.12.0-linux-x86_64.tar.gz
RUN tar zxvf nats-exporter.tar.gz
RUN mv prometheus-nats-exporter*/prometheus-nats-exporter ./

### stage: build flyutil
FROM golang:1.17 as flyutil
FROM golang:1.20 as flyutil
ARG VERSION

WORKDIR /go/src/github.com/fly-apps/nats-cluster
Expand All @@ -19,15 +18,15 @@ RUN go mod download

COPY . .

RUN CGO_ENABLED=0 GOOS=linux go build -v -o /fly/bin/start ./cmd/start
RUN CGO_ENABLED=0 GOOS=linux go build -v -buildvcs=false -o /fly/bin/start ./cmd/start

# stage: final image
FROM nats:2.7.2-scratch as nats-server
FROM nats:2.9.20-scratch as nats-server

FROM debian:bullseye-slim

COPY --from=nats-server /nats-server /usr/local/bin/
COPY --from=metrics /metrics/prometheus-nats-exporter /usr/local/bin/nats-exporter
COPY --from=flyutil /fly/bin/start /usr/local/bin/

CMD ["start"]
CMD ["start"]