From bc7d9f5b5e4dd3ff87d0486eaba628bb8d205e6e Mon Sep 17 00:00:00 2001 From: Christopher Speller Date: Mon, 15 Jun 2015 10:38:01 -0400 Subject: Adding Dockerfile and releated configs --- Dockerfile | 92 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 92 insertions(+) create mode 100644 Dockerfile (limited to 'Dockerfile') diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 000000000..2e2ad002d --- /dev/null +++ b/Dockerfile @@ -0,0 +1,92 @@ +FROM ubuntu:14.04 + +# Install Dependancies +RUN apt-get update && apt-get install -y build-essential +RUN apt-get install -y curl +RUN curl -sL https://deb.nodesource.com/setup | bash - +RUN apt-get install -y nodejs +RUN apt-get install -y ruby-full +RUN gem install compass + +# +# Install GO +# + +RUN apt-get update && apt-get install -y \ + gcc libc6-dev make git mercurial \ + --no-install-recommends \ + && rm -rf /var/lib/apt/lists/* + +ENV GOLANG_VERSION 1.4.2 + +RUN curl -sSL https://golang.org/dl/go$GOLANG_VERSION.src.tar.gz \ + | tar -v -C /usr/src -xz + +RUN cd /usr/src/go/src && ./make.bash --no-clean 2>&1 + +ENV PATH /usr/src/go/bin:$PATH + +RUN mkdir -p /go/src /go/bin && chmod -R 777 /go +ENV GOPATH /go +ENV PATH /go/bin:$PATH +WORKDIR /go + +# --------------------------------------------------------------------------------------------------------------------- + +# +# Install SQL +# + +ENV MYSQL_ROOT_PASSWORD=mostest +ENV MYSQL_USER=mmuser +ENV MYSQL_PASSWORD=mostest +ENV MYSQL_DATABASE=mattermost_test + +RUN groupadd -r mysql && useradd -r -g mysql mysql + +RUN apt-get update && apt-get install -y perl --no-install-recommends && rm -rf /var/lib/apt/lists/* + +RUN apt-key adv --keyserver pool.sks-keyservers.net --recv-keys A4A9406876FCBD3C456770C88C718D3B5072E1F5 + +ENV MYSQL_MAJOR 5.6 +ENV MYSQL_VERSION 5.6.25 + +RUN echo "deb http://repo.mysql.com/apt/debian/ wheezy mysql-${MYSQL_MAJOR}" > /etc/apt/sources.list.d/mysql.list + +RUN apt-get update \ + && export DEBIAN_FRONTEND=noninteractive \ + && apt-get -y install mysql-server \ + && rm -rf /var/lib/apt/lists/* \ + && rm -rf /var/lib/mysql && mkdir -p /var/lib/mysql + +RUN sed -Ei 's/^(bind-address|log)/#&/' /etc/mysql/my.cnf + +VOLUME /var/lib/mysql +# --------------------------------------------------------------------------------------------------------------------- + +# +# Install Redis +# + +RUN apt-get update && apt-get install -y wget +RUN wget http://download.redis.io/redis-stable.tar.gz; \ + tar xvzf redis-stable.tar.gz; \ + cd redis-stable; \ + make install + +# --------------------------------------------------------------------------------------------------------------------- + +# Copy over files +ADD . /go/src/github.com/mattermost/platform + + +RUN go get github.com/tools/godep +RUN cd /go/src/github.com/mattermost/platform; godep restore +RUN go install github.com/mattermost/platform +RUN cd /go/src/github.com/mattermost/platform/web/react; npm install + +RUN chmod +x /go/src/github.com/mattermost/platform/docker-entry.sh +ENTRYPOINT /go/src/github.com/mattermost/platform/docker-entry.sh + +# Ports +EXPOSE 8065 -- cgit v1.2.3-1-g7c22 From 76a0e0fea4ad2901716eae4b638a73befa1e49f8 Mon Sep 17 00:00:00 2001 From: Christopher Speller Date: Tue, 16 Jun 2015 14:15:55 -0400 Subject: Modifications for sending local mail --- Dockerfile | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'Dockerfile') diff --git a/Dockerfile b/Dockerfile index 2e2ad002d..da57550c0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,6 +8,9 @@ RUN apt-get install -y nodejs RUN apt-get install -y ruby-full RUN gem install compass +# Postfix +RUN apt-get install -y postfix + # # Install GO # @@ -79,6 +82,8 @@ RUN wget http://download.redis.io/redis-stable.tar.gz; \ # Copy over files ADD . /go/src/github.com/mattermost/platform +# Insert postfix config +ADD ./config/main.cf /etc/postfix/ RUN go get github.com/tools/godep RUN cd /go/src/github.com/mattermost/platform; godep restore @@ -89,4 +94,4 @@ RUN chmod +x /go/src/github.com/mattermost/platform/docker-entry.sh ENTRYPOINT /go/src/github.com/mattermost/platform/docker-entry.sh # Ports -EXPOSE 8065 +EXPOSE 80 -- cgit v1.2.3-1-g7c22