Skip to content

Commit 9006d70

Browse files
feat: Rocket.Chat 7.10.0 (#261)
1 parent 75c516a commit 9006d70

File tree

1 file changed

+83
-0
lines changed

1 file changed

+83
-0
lines changed

7.10/Dockerfile

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
FROM node:22-bookworm-slim
2+
3+
ENV DENO_VERSION=1.43.5
4+
5+
RUN ARCH= && dpkgArch="$(dpkg --print-architecture)" \
6+
&& case "${dpkgArch##*-}" in \
7+
amd64) ARCH='x86_64';; \
8+
arm64) ARCH='aarch64';; \
9+
*) echo "unsupported Deno architecture"; exit 1 ;; \
10+
esac \
11+
&& set -ex \
12+
&& apt-get update && apt-get install -y --no-install-recommends ca-certificates curl unzip && rm -rf /var/lib/apt/lists/* \
13+
&& curl -fsSL https://dl.deno.land/release/v${DENO_VERSION}/deno-${ARCH}-unknown-linux-gnu.zip --output /tmp/deno-${ARCH}-unknown-linux-gnu.zip \
14+
&& echo "246bf818932c5e11adb85afaaf3c90e65d5cbe14bcaa8ea14d35fc085869775d /tmp/deno-x86_64-unknown-linux-gnu.zip" | sha256sum -c - \
15+
&& unzip /tmp/deno-${ARCH}-unknown-linux-gnu.zip -d /tmp \
16+
&& rm /tmp/deno-${ARCH}-unknown-linux-gnu.zip \
17+
&& chmod 755 /tmp/deno \
18+
&& mv /tmp/deno /usr/local/bin/deno \
19+
&& apt-mark auto '.*' > /dev/null \
20+
&& find /usr/local -type f -executable -exec ldd '{}' ';' \
21+
| awk '/=>/ { print $(NF-1) }' \
22+
| sort -u \
23+
| xargs -r dpkg-query --search \
24+
| cut -d: -f1 \
25+
| sort -u \
26+
| xargs -r apt-mark manual \
27+
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false
28+
29+
RUN groupadd -r rocketchat \
30+
&& useradd -r -g rocketchat rocketchat \
31+
&& mkdir -p /app/uploads \
32+
&& chown rocketchat:rocketchat /app/uploads
33+
34+
VOLUME /app/uploads
35+
36+
WORKDIR /app
37+
38+
ENV NODE_ENV=production
39+
40+
ENV RC_VERSION=7.10.0
41+
42+
RUN set -eux \
43+
&& apt-get update \
44+
&& apt-get install -y --no-install-recommends fontconfig \
45+
&& aptMark="$(apt-mark showmanual)" \
46+
&& apt-get install -y --no-install-recommends g++ make python3 ca-certificates curl gnupg \
47+
&& rm -rf /var/lib/apt/lists/* \
48+
# gpg: key 4FD08104: public key "Rocket.Chat Buildmaster <buildmaster@rocket.chat>" imported
49+
&& gpg --batch --keyserver keyserver.ubuntu.com --recv-keys 0E163286C20D07B9787EBE9FD7F9D0414FD08104 \
50+
&& curl -fSL "https://releases.rocket.chat/${RC_VERSION}/download" -o rocket.chat.tgz \
51+
&& curl -fSL "https://releases.rocket.chat/${RC_VERSION}/asc" -o rocket.chat.tgz.asc \
52+
&& gpg --batch --verify rocket.chat.tgz.asc rocket.chat.tgz \
53+
&& tar zxf rocket.chat.tgz \
54+
&& rm rocket.chat.tgz rocket.chat.tgz.asc \
55+
&& cd bundle/programs/server \
56+
&& npm install --unsafe-perm=true \
57+
&& apt-mark auto '.*' > /dev/null \
58+
&& apt-mark manual $aptMark > /dev/null \
59+
&& find /usr/local -type f -executable -exec ldd '{}' ';' \
60+
| awk '/=>/ { print $(NF-1) }' \
61+
| sort -u \
62+
| xargs -r dpkg-query --search \
63+
| cut -d: -f1 \
64+
| sort -u \
65+
| xargs -r apt-mark manual \
66+
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \
67+
&& npm cache clear --force \
68+
&& chown -R rocketchat:rocketchat /app
69+
70+
USER rocketchat
71+
72+
WORKDIR /app/bundle
73+
74+
# needs a mongoinstance - defaults to container linking with alias 'db'
75+
ENV DEPLOY_METHOD=docker-official \
76+
MONGO_URL=mongodb://db:27017/meteor \
77+
HOME=/tmp \
78+
PORT=3000 \
79+
ROOT_URL=http://localhost:3000
80+
81+
EXPOSE 3000
82+
83+
CMD ["node", "main.js"]

0 commit comments

Comments
 (0)