mirror of
https://github.com/shazow/ssh-chat.git
synced 2025-04-04 19:30:07 +03:00
22 lines
345 B
Docker
22 lines
345 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 openssh
|
|
RUN mkdir /root/.ssh
|
|
WORKDIR /root/.ssh
|
|
RUN ssh-keygen -t rsa -C "chatkey" -f 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"]
|