Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
FROM golang:1.6

RUN apt-get update \
&& apt-get install --yes net-tools netcat redis-tools

ARG user=relax
ARG group=relax
ARG uid=1000
ARG gid=1000
ENV GOPATH=/opt/relax

WORKDIR ${GOPATH}

COPY . .



RUN go get github.com/zerobotlabs/relax/slack \
&& go get github.com/zerobotlabs/relax/healthcheck \
&& go build \
&& mv relax bin

RUN chown ${uid}:${gid} $GOPATH \
&& groupadd -g ${gid} ${group} \
&& useradd -d "$GOPATH" -u ${uid} -g ${gid} -m -s /bin/bash ${user} \
&& chown -R ${uid}:${gid} /usr/local /bin

USER ${user}

CMD ["bin/relax"]