mirror of
https://github.com/jessfraz/dockerfiles.git
synced 2024-11-27 04:16:45 +01:00
cleanup
Signed-off-by: Jess Frazelle <acidburn@microsoft.com>
This commit is contained in:
parent
123d933f8f
commit
211c9a5dba
|
@ -1,9 +1,27 @@
|
||||||
FROM debian:buster-slim as builder
|
FROM golang:latest as builder
|
||||||
LABEL maintainer "Jessie Frazelle <jess@linux.com>"
|
LABEL maintainer "Jessie Frazelle <jess@linux.com>"
|
||||||
|
|
||||||
ENV PATH /go/bin:/usr/local/go/bin:$PATH
|
ENV PATH /go/bin:/usr/local/go/bin:$PATH
|
||||||
ENV GOPATH /go
|
ENV GOPATH /go
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
RUN apt-get update && apt-get install -y \
|
RUN apt-get update && apt-get install -y \
|
||||||
ca-certificates \
|
ca-certificates \
|
||||||
libgtk-3-0 \
|
libgtk-3-0 \
|
||||||
|
@ -12,28 +30,6 @@ RUN apt-get update && apt-get install -y \
|
||||||
--no-install-recommends \
|
--no-install-recommends \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
RUN buildDeps=' \
|
|
||||||
golang \
|
|
||||||
git \
|
|
||||||
gcc \
|
|
||||||
libgtk-3-dev \
|
|
||||||
libgtkspell3-3-dev \
|
|
||||||
libtspi-dev \
|
|
||||||
pkg-config \
|
|
||||||
' \
|
|
||||||
set -x \
|
|
||||||
&& apt-get update \
|
|
||||||
&& apt-get install -y $buildDeps --no-install-recommends \
|
|
||||||
&& go get -d -v github.com/agl/pond/client \
|
|
||||||
&& go get -d -v github.com/agl/pond/server \
|
|
||||||
&& cd /go/src/github.com/agl/pond \
|
|
||||||
&& go build -o /usr/bin/pond-client ./client \
|
|
||||||
&& go build -o /usr/bin/pond-server ./server \
|
|
||||||
&& apt-get purge -y --auto-remove $buildDeps \
|
|
||||||
&& rm -rf /var/lib/apt/lists/* \
|
|
||||||
&& rm -rf /go \
|
|
||||||
&& echo "Build complete."
|
|
||||||
|
|
||||||
# create pond user
|
# create pond user
|
||||||
ENV HOME /home/pond
|
ENV HOME /home/pond
|
||||||
RUN useradd --create-home --home-dir $HOME pond \
|
RUN useradd --create-home --home-dir $HOME pond \
|
||||||
|
@ -44,4 +40,5 @@ USER pond
|
||||||
|
|
||||||
COPY --from=builder /usr/bin/pond-client /usr/bin/pond-client
|
COPY --from=builder /usr/bin/pond-client /usr/bin/pond-client
|
||||||
COPY --from=builder /usr/bin/pond-server /usr/bin/pond-server
|
COPY --from=builder /usr/bin/pond-server /usr/bin/pond-server
|
||||||
|
|
||||||
CMD [ "pond-client", "-cli" ]
|
CMD [ "pond-client", "-cli" ]
|
||||||
|
|
Loading…
Reference in New Issue
Block a user