From 1680db0961a3047359636c0c5552b02cb06e6cab Mon Sep 17 00:00:00 2001 From: Stephan van Ellewee Date: Fri, 28 Feb 2020 14:43:17 +0200 Subject: [PATCH] Added Makefile mods, Dockerfile for demo --- Dockerfile | 15 +++++++++++++++ Makefile | 2 ++ 2 files changed, 17 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..95dcea5 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,15 @@ +FROM golang:1.13.1 + +WORKDIR /gotty +COPY . /gotty +RUN CGO_ENABLED=0 make + +FROM alpine:latest + +RUN apk update && \ + apk upgrade && \ + apk --no-cache add ca-certificates && \ + apk add bash +WORKDIR /root +COPY --from=0 /gotty/gotty /usr/bin/ +CMD ["gotty", "-w", "bash"] diff --git a/Makefile b/Makefile index b6149f0..339e230 100644 --- a/Makefile +++ b/Makefile @@ -78,3 +78,5 @@ shasums: release: ghr -c ${GIT_COMMIT} --delete --prerelease -u yudai -r gotty pre-release ${OUTPUT_DIR}/dist +clean: + rm -fr gotty