1
0
Fork 0
mirror of https://github.com/postmannen/ctrl.git synced 2024-12-14 12:37:31 +00:00
ctrl/Dockerfile

21 lines
360 B
Text
Raw Normal View History

# build stage
FROM golang:1.22-alpine AS build-env
RUN apk --no-cache add build-base git gcc
RUN mkdir -p /build
2022-02-18 10:55:15 +00:00
COPY ./ /build/
WORKDIR /build/cmd/ctrl/
RUN go version
RUN go build -o ctrl
# final stage
FROM alpine
RUN apk update && apk add curl && apk add nmap
WORKDIR /app
COPY --from=build-env /build/cmd/ctrl/ctrl /app/
CMD ["ash","-c","/app/ctrl"]