blob: f837d31a80c8e6e8979a162494073b97741b1cc6 [file] [log] [blame]
# Build everything at least. This is a work in progress.
# Useful for testing things before a release.
# Will also be used for running the website and public
# read-only blobserver.
FROM ubuntu:12.04
MAINTAINER camlistore <>
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
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/
ADD cmd /gopath/src/
ADD website /gopath/src/
ADD third_party /gopath/src/
ADD server /gopath/src/
ADD dev /gopath/src/
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 \ \ \ \ \ \
ENV USER camli
ENV HOME /home/camli
WORKDIR /home/camli
EXPOSE 80 443 3179 8080
CMD /bin/bash