Files
go-ssh-server/Dockerfile

21 lines
330 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
ENV COMMAND /app/tui
EXPOSE 22
CMD ["/usr/local/bin/sshserver"]