Add Dockerfile and docker-compose.yml

This commit is contained in:
Alwin Lohrie committed 2020-10-28 16:19:16 +01:00
1 parent 4fe43746fe
commit d42996c14b
2 files changed
+28

No files matched your search

+21
View File
@@ -0,0 +1,21 @@
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"]
+7
View File
@@ -0,0 +1,7 @@
version: '3'
services:
app:
build: .
ports:
- 2022:2022
restart: always