instances-api/Dockerfile

22 lines
394 B
Docker
Raw Permalink Normal View History

2022-02-14 07:35:02 +00:00
FROM golang:latest AS build
WORKDIR /app/
COPY . .
2022-02-23 11:33:06 +00:00
RUN --mount=type=cache,target=/root/.cache/go-build \
go build -ldflags "-s -w" main.go
2022-02-14 07:35:02 +00:00
FROM debian:unstable-slim
RUN apt-get update && apt-get install -y --no-install-recommends \
ca-certificates \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app/
COPY --from=build /app/main /app/instances-api
EXPOSE 3000
CMD ./instances-api