-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
69 lines (58 loc) · 2.44 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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
FROM tozd/nginx-cron:ubuntu-bionic
ENV HOST chat.cloyne.org
ENV NODE_VERSION 14.19.3
ENV RC_VERSION latest
ENV MAILTO closoft
ENV ADMINADDR clonm
ENV REMOTES bsc.coop
VOLUME /data/mongo
VOLUME /dump
VOLUME /etc/rocketchat
VOLUME /var/log/rocketchat
# RUN apt-get update -q -q && \
# apt-get install rsyslog locales --no-install-recommends --yes && \
# apt-get install openssh-server --yes && \
# echo 'en_US.UTF-8 UTF-8' >> /etc/locale.gen && \
# dpkg-reconfigure locales
#
# gpg: key 4FD08014: public key "Rocket.Chat Buildmaster <buildmaster@rocket.chat>" imported
RUN gpg --batch --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 0E163286C20D07B9787EBE9FD7F9D0414FD08104
COPY ./etc /etc
## Install necessary dependency packages
RUN apt-get -y update && apt-get install apt-transport-https --yes && \
apt install ca-certificates --yes && \
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 9DA31620334BD75D9DCB49F368818C72E52529D4 && \
echo "deb [ arch=amd64 ] https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/4.0 multiverse" | tee /etc/apt/sources.list.d/mongodb-org-4.0.list && \
apt-get update && \
apt-get install openssh-client curl build-essential mongodb-org --no-install-recommends -y && \
curl -sL curl -sL https://deb.nodesource.com/setup_14.x | sudo bash - && \
apt-get install -y nodejs graphicsmagick && \
npm install -g inherits n && \
n $NODE_VERSION && \
set -x && \
curl -SLf "https://releases.rocket.chat/${RC_VERSION}/download" -o rocket.chat.tgz && \
curl -SLf "https://releases.rocket.chat/${RC_VERSION}/asc" -o rocket.chat.tgz.asc && \
gpg --verify rocket.chat.tgz.asc && \
mkdir -p /Rocket.Chat && \
tar -zxf rocket.chat.tgz -C /Rocket.Chat && \
rm rocket.chat.tgz rocket.chat.tgz.asc && \
npm cache clear --force
# Configure the Rocket.Chat service
RUN set -x && \
groupadd -g 99999 -r rocketchat && \
useradd -u 99999 -r -g rocketchat rocketchat && \
cd /Rocket.Chat/bundle/programs/server && \
npm install && \
npm cache clear --force && \
sed -i 's/log\/nullmailer/log\/rocketchat\/nullmailer/' /etc/service/nullmailer/log/run && \
chown -R rocketchat:rocketchat /Rocket.Chat
VOLUME /Rocket.Chat/uploads
# needs a mongoinstance - defaults to container linking with alias 'mongo'
ENV DEPLOLY_METHOD=docker \
NODE_ENV=production \
MONGO_URL=mongodb://mongo:27017/rocketchat \
HOME=/tmp \
PORT=3000 \
ROOT_URL=${HOST}:3000 \
Accounts_AvatarStorePath=/Rocket.Chat/uploads
EXPOSE 3000