Add Dockerfile
This commit is contained in:
parent
66bb3ba76f
commit
3075f7832a
31
Dockerfile
Normal file
31
Dockerfile
Normal file
@ -0,0 +1,31 @@
|
||||
FROM golang:alpine as builder
|
||||
|
||||
ENV PATH /go/bin:/usr/local/go/bin:$PATH
|
||||
ENV GOPATH /go
|
||||
|
||||
RUN apk add --no-cache \
|
||||
ca-certificates
|
||||
|
||||
COPY . /go/src/github.com/erroneousboat/slack-term
|
||||
|
||||
RUN set -x \
|
||||
&& apk add --no-cache --virtual .build-deps \
|
||||
git \
|
||||
gcc \
|
||||
libc-dev \
|
||||
libgcc \
|
||||
make \
|
||||
&& cd /go/src/github.com/erroneousboat/slack-term \
|
||||
&& make build \
|
||||
&& mv ./bin/slack-term /usr/bin/slack-term \
|
||||
&& apk del .build-deps \
|
||||
&& rm -rf /go
|
||||
|
||||
FROM alpine:latest
|
||||
|
||||
ENV USER root
|
||||
|
||||
COPY --from=builder /usr/bin/slack-term /usr/bin/slack-term
|
||||
COPY --from=builder /etc/ssl/certs/ /etc/ssl/certs
|
||||
|
||||
ENTRYPOINT stty cols 25 && slack-term -config .slack-term
|
Loading…
Reference in New Issue
Block a user