-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.dev
More file actions
27 lines (23 loc) · 1.68 KB
/
Copy pathDockerfile.dev
File metadata and controls
27 lines (23 loc) · 1.68 KB
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
FROM ghcr.io/nodebb/nodebb:4.15.1
# Development builds package the plugin from the sibling monorepo exactly as npm
# would publish it, then install that tarball into NodeBB. This catches missing
# `files` entries while still letting local plugin changes be tested before publish.
USER nodebb
COPY --chown=nodebb:nodebb discord-nodebb-sync/package.json /opt/nodebb-plugin-discord-sync/package.json
COPY --chown=nodebb:nodebb discord-nodebb-sync/plugin.json /opt/nodebb-plugin-discord-sync/plugin.json
COPY --chown=nodebb:nodebb discord-nodebb-sync/library.js /opt/nodebb-plugin-discord-sync/library.js
COPY --chown=nodebb:nodebb discord-nodebb-sync/lib /opt/nodebb-plugin-discord-sync/lib
RUN set -eu; \
cd /usr/src/app; \
plugin_tarball="$(npm pack /opt/nodebb-plugin-discord-sync --pack-destination /tmp --silent)"; \
npm install --omit=dev --no-audit --no-fund "/tmp/${plugin_tarball}"; \
rm -f "/tmp/${plugin_tarball}"; \
npm install --omit=dev --no-audit --no-fund nodebb-plugin-sso-oauth2-multiple@2.0.0 \
&& npm install --omit=dev --no-audit --no-fund @nodebb/nodebb-plugin-reactions@3.0.4
USER root
COPY nodebb-deploy/activate-plugins.sh /usr/local/bin/nodebb-activate-required-plugins
COPY nodebb-deploy/first-install.sh /usr/local/bin/nodebb-first-install
RUN chmod +x /usr/local/bin/nodebb-activate-required-plugins /usr/local/bin/nodebb-first-install \
&& sed -i '/^[[:space:]]*install_additional_plugins[[:space:]]*$/a\ /usr/local/bin/nodebb-activate-required-plugins "$CONFIG"' /usr/local/bin/entrypoint.sh \
&& sed -i 's|^[[:space:]]*start_installation_session "$NODEBB_INIT_VERB" "$CONFIG"$| /usr/local/bin/nodebb-first-install "$CONFIG"|' /usr/local/bin/entrypoint.sh
USER nodebb