2025-11-06 16:21:54 +01:00
|
|
|
FROM golang:1.24-alpine AS builder
|
2025-11-06 14:43:35 +01:00
|
|
|
|
|
|
|
|
WORKDIR /app
|
|
|
|
|
|
|
|
|
|
COPY go.mod go.sum ./
|
|
|
|
|
RUN go mod download
|
|
|
|
|
|
|
|
|
|
COPY main.go ./
|
|
|
|
|
RUN go build -o sshserver main.go
|
|
|
|
|
|
|
|
|
|
FROM alpine:latest
|
|
|
|
|
|
|
|
|
|
RUN apk add --no-cache ca-certificates
|
|
|
|
|
|
|
|
|
|
COPY --from=builder /app/sshserver /usr/local/bin/sshserver
|
|
|
|
|
|
|
|
|
|
EXPOSE 22
|
|
|
|
|
|
|
|
|
|
CMD ["/usr/local/bin/sshserver"]
|