RocketChat / RocketChat/Docker.Official.Image

Proposition Dockerfile arm64

Open
#190 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Dockerfile
Stars
337
Forks
228
Avg merge
3d 10h
Merged PRs (30d)
5

Description

Hello, i don't know if this project will be used much, i don't know much about the Rocket.Chat structure but i had to adapt the Dockerfile of version 6.0 to work on the Pi4, i based on your Dockerfile and aligned to the left the lines i have changed.
Greetings

ARG NODE_IMAGE=${NODE_IMAGE:-node:14-bullseye-slim}
FROM ${NODE_IMAGE} as builder

ARG TOOLCHAIN=${TOOLCHAIN:-nightly-2023-04-23}
ARG RC_VERSION=${RC_VERSION:-6.1.5}
ENV TOOLCHAIN=${TOOLCHAIN}
ENV RC_VERSION=${RC_VERSION}

WORKDIR /app

RUN set -eux \
  && apt-get update \
  && apt-get install -y --no-install-recommends fontconfig \
  && aptMark="$(apt-mark showmanual)" \
&& apt-get install -y --no-install-recommends build-essential python3 ca-certificates curl gnupg cmake wget \
  && rm -rf /var/lib/apt/lists/* \
  # gpg: key 4FD08104: public key "Rocket.Chat Buildmaster <buildmaster@rocket.chat>" imported
  && gpg --batch --keyserver keyserver.ubuntu.com --recv-keys 0E163286C20D07B9787EBE9FD7F9D0414FD08104 \
&& curl -fSL "https://releases.rocket.chat/$RC_VERSION/download" -o rocket.chat.tgz \
&& curl -fSL "https://releases.rocket.chat/$RC_VERSION/asc" -o rocket.chat.tgz.asc \
  && gpg --batch --verify rocket.chat.tgz.asc rocket.chat.tgz \
  && tar zxf rocket.chat.tgz \
  && rm rocket.chat.tgz rocket.chat.tgz.asc \
&& wget -O /app/bundle/programs/server/npm/node_modules/@rocket.chat/forked-matrix-sdk-crypto-nodejs/lib/index.linux-arm64-gnu.node \
https://github.com/matrix-org/matrix-rust-sdk/releases/download/matrix-sdk-crypto-nodejs-v0.1.0-beta.6/matrix-sdk-crypto.linux-arm64-gnu.node \
&& curl -fSL https://github.com/kelektiv/node.bcrypt.js/releases/download/v5.1.0/bcrypt_lib-v5.1.0-napi-v3-linux-arm64-glibc.tar.gz | gzip -d > \
/app/bundle/programs/server/npm/node_modules/meteor/accounts-password/node_modules/bcrypt/lib/binding/napi-v3/bcrypt_lib.node \
&& curl https://sh.rustup.rs -sSf | sh -s -- -y \
&& . "$HOME/.cargo/env" \
&& rustup default $TOOLCHAIN \
  && cd bundle/programs/server \
&& yarn \
  && apt-mark auto '.*' > /dev/null \
  && apt-mark manual $aptMark > /dev/null \
  && find /usr/local -type f -executable -exec ldd '{}' ';' \
  | awk '/=>/ { print $(NF-1) }' \
  | sort -u \
  | xargs -r dpkg-query --search \
  | cut -d: -f1 \
  | sort -u \
  | xargs -r apt-mark manual \
  && apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \
  && npm cache clear --force
#  && chown -R rocketchat:rocketchat /app

FROM ${NODE_IMAGE}

RUN set -eux \
  && apt-get update \
  && apt-get install -y --no-install-recommends fontconfig \
  && apt clean

RUN groupadd -r rocketchat \
  && useradd -r -g rocketchat rocketchat \
  && mkdir -p /app/uploads \
  && chown rocketchat:rocketchat /app/uploads

COPY --chown=rocketchat:rocketchat --from=builder /app /app

USER rocketchat

WORKDIR /app/bundle

# needs a mongoinstance - defaults to container linking with alias 'db'
ENV DEPLOY_METHOD=docker-official \
  MONGO_URL=mongodb://db:27017/meteor \
  HOME=/tmp \
  PORT=3000 \
  ROOT_URL=http://localhost:3000 \
  Accounts_AvatarStorePath=/app/uploads

EXPOSE 3000

CMD ["node", "main.js"]

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Compare the proposed Dockerfile changes with the repository's current Dockerfile, focusing on the arm64 dependencies and image build steps. Build and run the image on a Pi4 or another arm64 environment; done means the Rocket.Chat container builds successfully and starts with the documented MongoDB connection.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker
Domain
devops
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.