-
Notifications
You must be signed in to change notification settings - Fork 5
/
Dockerfile
30 lines (22 loc) · 909 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
FROM ubuntu:16.04
ENV goversion=go1.6.2.linux-amd64 \
GOPATH=/go
COPY main.go /go/src/github.com/smancke/gogallery/
COPY service /go/src/github.com/smancke/gogallery/service
COPY imglib /go/src/github.com/smancke/gogallery/imglib
COPY html /html
RUN apt-get update && \
apt-get install -y git wget && \
apt-get install -y libvips-tools build-essential --no-install-recommends && \
wget https://storage.googleapis.com/golang/${goversion}.tar.gz && \
tar -C /usr/local -xzf ${goversion}.tar.gz && \
ln -s /usr/local/go/bin/go /usr/bin/go && \
cd /go/src/github.com/smancke/gogallery && \
go get -v -t ./... && go test ./... && go vet ./... && go install . && \
rm -rf /go/pkg /go/src /usr/local/go /${goversion}.tar.gz /var/lib/apt/lists/*
ENV galleryDir=/var/lib/gallery \
htmlDir=/html
VOLUME /var/lib/gallery
VOLUME /tmp
EXPOSE 5005
CMD ["/go/bin/gogallery"]