Files
go-ssh-server/Dockerfile
dcorral 06cb53c5f8
Some checks failed
Build, Test and Push Docker Image / e2e-test (push) Failing after 6s
Build, Test and Push Docker Image / build-and-push (push) Has been skipped
copy folders in Dockerfile
2025-11-06 20:45:03 +01:00

19 lines
325 B
Docker

FROM golang:1.24-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 && mkdir -p /app
COPY --from=builder /app/sshserver /usr/local/bin/sshserver
EXPOSE 22
CMD ["/usr/local/bin/sshserver"]