Spaces:
Runtime error
Runtime error
Update Dockerfile
Browse files- Dockerfile +8 -9
Dockerfile
CHANGED
|
@@ -18,13 +18,10 @@ RUN set -x \
|
|
| 18 |
&& npm cache clear --force \
|
| 19 |
&& chown -R rocketchat:rocketchat /app
|
| 20 |
|
| 21 |
-
#
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
# Set up iptables rule to redirect port 7860 to 3000
|
| 27 |
-
RUN iptables -t nat -A PREROUTING -p tcp --dport 7860 -j REDIRECT --to-port 3000
|
| 28 |
|
| 29 |
USER rocketchat
|
| 30 |
|
|
@@ -41,7 +38,9 @@ ENV DEPLOY_METHOD=docker \
|
|
| 41 |
ROOT_URL=http://localhost:3000 \
|
| 42 |
Accounts_AvatarStorePath=/app/uploads
|
| 43 |
|
| 44 |
-
# Expose
|
| 45 |
EXPOSE 7860
|
| 46 |
|
| 47 |
-
|
|
|
|
|
|
|
|
|
| 18 |
&& npm cache clear --force \
|
| 19 |
&& chown -R rocketchat:rocketchat /app
|
| 20 |
|
| 21 |
+
# Install socat for port forwarding
|
| 22 |
+
RUN apt-get update && \
|
| 23 |
+
apt-get install -y socat && \
|
| 24 |
+
rm -rf /var/lib/apt/lists/*
|
|
|
|
|
|
|
|
|
|
| 25 |
|
| 26 |
USER rocketchat
|
| 27 |
|
|
|
|
| 38 |
ROOT_URL=http://localhost:3000 \
|
| 39 |
Accounts_AvatarStorePath=/app/uploads
|
| 40 |
|
| 41 |
+
# Expose port 7860 externally
|
| 42 |
EXPOSE 7860
|
| 43 |
|
| 44 |
+
# Run socat to forward port 7860 to 3000 and start Rocket.Chat
|
| 45 |
+
CMD socat TCP-LISTEN:7860,reuseaddr,fork TCP:localhost:3000 & \
|
| 46 |
+
node main.js
|