forked from perkeep/perkeep
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
55 lines (43 loc) · 1.41 KB
/
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# Build everything at least. This is a work in progress.
#
# Useful for testing things before a release.
#
# Will also be used for running the camlistore.org website and public
# read-only blobserver.
FROM ubuntu:12.04
MAINTAINER camlistore <[email protected]>
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update && apt-get upgrade -y
RUN apt-get install -y curl make git
RUN curl -o /tmp/go.tar.gz https://go.googlecode.com/files/go1.2.linux-amd64.tar.gz
RUN tar -C /usr/local -zxvf /tmp/go.tar.gz
RUN rm /tmp/go.tar.gz
RUN /usr/local/go/bin/go version
ENV GOROOT /usr/local/go
ENV PATH $GOROOT/bin:/gopath/bin:$PATH
RUN mkdir -p /gopath/src
ADD pkg /gopath/src/camlistore.org/pkg
ADD cmd /gopath/src/camlistore.org/cmd
ADD website /gopath/src/camlistore.org/website
ADD third_party /gopath/src/camlistore.org/third_party
ADD server /gopath/src/camlistore.org/server
ADD dev /gopath/src/camlistore.org/dev
RUN adduser --disabled-password --quiet --gecos Camli camli
RUN mkdir -p /gopath/bin
RUN chown camli.camli /gopath/bin
RUN mkdir -p /gopath/pkg
RUN chown camli.camli /gopath/pkg
USER camli
ENV GOPATH /gopath
RUN go install \
camlistore.org/server/camlistored \
camlistore.org/cmd/camput \
camlistore.org/cmd/camget \
camlistore.org/cmd/camtool \
camlistore.org/website \
camlistore.org/dev/devcam
ENV USER camli
ENV HOME /home/camli
WORKDIR /home/camli
EXPOSE 80 443 3179 8080
CMD /bin/bash