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