2024-08-27 23:15:23 +03:00
|
|
|
FROM mcr.microsoft.com/oss/go/microsoft/golang:1.22 AS builder
|
2023-03-01 03:25:00 +03:00
|
|
|
ARG VERSION
|
|
|
|
ARG NPM_AI_PATH
|
|
|
|
ARG NPM_AI_ID
|
|
|
|
WORKDIR /usr/local/src
|
|
|
|
COPY . .
|
2023-07-14 09:35:18 +03:00
|
|
|
RUN CGO_ENABLED=0 go build -v -o /usr/local/bin/azure-npm -ldflags "-X main.version="$VERSION" -X "$NPM_AI_PATH"="$NPM_AI_ID"" -gcflags="-dwarflocationlists=true" npm/cmd/*.go
|
2023-03-01 03:25:00 +03:00
|
|
|
|
2024-06-18 00:53:44 +03:00
|
|
|
FROM mcr.microsoft.com/mirror/docker/library/ubuntu:20.04 as linux
|
2023-03-01 03:25:00 +03:00
|
|
|
COPY --from=builder /usr/local/bin/azure-npm /usr/bin/azure-npm
|
|
|
|
RUN apt-get update && apt-get install -y iptables ipset ca-certificates && apt-get autoremove -y && apt-get clean
|
|
|
|
RUN chmod +x /usr/bin/azure-npm
|
|
|
|
ENTRYPOINT ["/usr/bin/azure-npm", "start"]
|