erroneousboat-slack-term/Dockerfile
Lyle Hanson ce1d8ce03f Respect the XDG Base Directory specification for configs
Rather than assuming a configuration file at `~/.slack-term`, respect
the user's choice per the XDG Base Directory specification
(https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html)
to find the configuration.

Uses a cross-platform XDG library to abstract the details of the
specification and encompass any future changes
(https://github.com/OpenPeeDeeP/xdg, https://godoc.org/github.com/OpenPeeDeeP/xdg).

After merging, the [wiki home page](https://github.com/erroneousboat/slack-term/wiki)
should be updated to reflect the new configuration location.

This closes #170 and closes #203.
2020-01-08 11:39:16 +01:00

32 lines
671 B
Docker

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 ~/.config/slack-term/config