Files
go-ssh-server/Dockerfile
dcorral c0a1b6fca8
Some checks failed
Build and Push Docker Image / build-and-push (push) Failing after 16s
Require COMMAND env var, remove default, add docker-compose example
2025-11-06 14:47:24 +01:00

19 lines
308 B
Docker

FROM golang:1.21-alpine AS builder
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"]