mirror of
https://github.com/TeamPiped/instances-api.git
synced 2024-12-14 14:20:37 +05:30
22 lines
394 B
Docker
22 lines
394 B
Docker
FROM golang:latest AS build
|
|
|
|
WORKDIR /app/
|
|
|
|
COPY . .
|
|
|
|
RUN --mount=type=cache,target=/root/.cache/go-build \
|
|
go build -ldflags "-s -w" main.go
|
|
|
|
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
|