2018-09-14 22:47:10 +02:00
|
|
|
FROM golang:latest as builder
|
2017-03-09 19:14:37 +01:00
|
|
|
LABEL maintainer "Jessie Frazelle <jess@linux.com>"
|
2015-12-04 20:40:22 +01:00
|
|
|
|
|
|
|
ENV PATH /go/bin:/usr/local/go/bin:$PATH
|
|
|
|
ENV GOPATH /go
|
|
|
|
|
2018-09-14 22:47:10 +02:00
|
|
|
RUN apt-get update && apt-get install -y \
|
|
|
|
libgtk-3-dev \
|
|
|
|
libgtkspell3-3-dev \
|
|
|
|
libtspi-dev \
|
|
|
|
pkg-config \
|
|
|
|
--no-install-recommends \
|
|
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
|
|
|
|
RUN go get -d -v github.com/agl/pond/client \
|
|
|
|
&& go get -d -v github.com/agl/pond/server
|
|
|
|
|
|
|
|
WORKDIR /go/src/github.com/agl/pond
|
|
|
|
|
|
|
|
RUN go build -o /usr/bin/pond-client ./client \
|
|
|
|
&& go build -o /usr/bin/pond-server ./server
|
|
|
|
|
|
|
|
FROM debian:buster-slim
|
|
|
|
|
2015-12-04 20:40:22 +01:00
|
|
|
RUN apt-get update && apt-get install -y \
|
|
|
|
ca-certificates \
|
|
|
|
libgtk-3-0 \
|
|
|
|
libgtkspell3-3-0 \
|
|
|
|
libtspi1 \
|
|
|
|
--no-install-recommends \
|
|
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
|
|
|
|
# create pond user
|
|
|
|
ENV HOME /home/pond
|
|
|
|
RUN useradd --create-home --home-dir $HOME pond \
|
|
|
|
&& chown -R pond:pond $HOME
|
|
|
|
|
|
|
|
WORKDIR $HOME
|
|
|
|
USER pond
|
|
|
|
|
2018-09-14 22:39:30 +02:00
|
|
|
COPY --from=builder /usr/bin/pond-client /usr/bin/pond-client
|
|
|
|
COPY --from=builder /usr/bin/pond-server /usr/bin/pond-server
|
2018-09-14 22:47:10 +02:00
|
|
|
|
2015-12-04 20:40:22 +01:00
|
|
|
CMD [ "pond-client", "-cli" ]
|