mirror of
https://github.com/shazow/ssh-chat.git
synced 2026-10-22 23:52:12 +03:00
20 lines
341 B
Docker
20 lines
341 B
Docker
FROM golang:alpine AS builder
|
|
|
|
WORKDIR /usr/src/app
|
|
|
|
COPY . .
|
|
RUN apk add make openssh
|
|
RUN make build
|
|
|
|
|
|
FROM alpine
|
|
|
|
RUN apk add --no-cache openssh tzdata && \
|
|
ssh-keygen -t rsa -C "chatkey" -f /root/.ssh/id_rsa
|
|
|
|
WORKDIR /usr/local/bin
|
|
|
|
COPY --from=builder /usr/src/app/ssh-chat .
|
|
RUN chmod +x ssh-chat
|
|
CMD ["/usr/local/bin/ssh-chat"]
|