Spaces:
Runtime error
Runtime error
anuj
commited on
Commit
·
06d0461
1
Parent(s):
5552216
batfa
Browse files- Dockerfile +7 -8
Dockerfile
CHANGED
@@ -24,17 +24,16 @@ RUN curl -fsSL https://www.mongodb.org/static/pgp/server-8.0.asc | \
|
|
24 |
&& apt-get update \
|
25 |
&& apt-get install -y mongodb-org mongodb-mongosh
|
26 |
|
27 |
-
# Create
|
28 |
-
RUN mkdir -p /data/db && \
|
29 |
-
chown -R rocketchat:rocketchat /data/db
|
30 |
-
|
31 |
-
# Create required directories
|
32 |
-
RUN mkdir -p /opt/Rocket.Chat
|
33 |
-
|
34 |
-
# Create rocketchat user
|
35 |
RUN useradd -M rocketchat && \
|
36 |
usermod -L rocketchat
|
37 |
|
|
|
|
|
|
|
|
|
|
|
|
|
38 |
# Download and install Rocket.Chat
|
39 |
RUN curl -L https://releases.rocket.chat/latest/download -o /tmp/rocket.chat.tgz && \
|
40 |
tar -xzf /tmp/rocket.chat.tgz -C /opt/Rocket.Chat --strip-components=1 && \
|
|
|
24 |
&& apt-get update \
|
25 |
&& apt-get install -y mongodb-org mongodb-mongosh
|
26 |
|
27 |
+
# Create rocketchat user first
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
28 |
RUN useradd -M rocketchat && \
|
29 |
usermod -L rocketchat
|
30 |
|
31 |
+
# Create required directories and set permissions
|
32 |
+
RUN mkdir -p /data/db /opt/Rocket.Chat /var/log && \
|
33 |
+
touch /var/log/mongodb.log && \
|
34 |
+
chown -R rocketchat:rocketchat /data/db /opt/Rocket.Chat /var/log/mongodb.log && \
|
35 |
+
chmod 777 /var/log/mongodb.log
|
36 |
+
|
37 |
# Download and install Rocket.Chat
|
38 |
RUN curl -L https://releases.rocket.chat/latest/download -o /tmp/rocket.chat.tgz && \
|
39 |
tar -xzf /tmp/rocket.chat.tgz -C /opt/Rocket.Chat --strip-components=1 && \
|