2016-01-16 01:19:42 +02:00
|
|
|
#
|
|
|
|
# Dockerfile for nodebb
|
|
|
|
#
|
|
|
|
|
2021-04-22 04:55:12 +02:00
|
|
|
FROM alpine:3
|
|
|
|
MAINTAINER EasyPi Software Foundation
|
2016-01-16 01:19:42 +02:00
|
|
|
|
2022-07-13 05:16:07 +02:00
|
|
|
ARG BB_VER=2.2.4
|
|
|
|
ARG BB_URL=https://github.com/NodeBB/NodeBB/archive/v$BB_VER.tar.gz
|
|
|
|
ARG BB_DIR=/opt/nodebb
|
2016-01-16 01:19:42 +02:00
|
|
|
|
2022-01-17 10:53:36 +02:00
|
|
|
WORKDIR $BB_DIR
|
2016-01-16 01:19:42 +02:00
|
|
|
|
|
|
|
RUN set -ex \
|
|
|
|
&& apk add -U bash \
|
2018-08-18 23:48:40 +02:00
|
|
|
icu \
|
2016-01-16 01:19:42 +02:00
|
|
|
imagemagick \
|
|
|
|
nodejs \
|
2022-01-16 06:13:12 +02:00
|
|
|
npm \
|
2016-01-16 01:19:42 +02:00
|
|
|
openssl \
|
|
|
|
&& apk add -t TMP build-base \
|
|
|
|
curl \
|
|
|
|
git \
|
2018-08-18 23:48:40 +02:00
|
|
|
icu-dev \
|
2016-01-16 01:19:42 +02:00
|
|
|
openssl-dev \
|
2022-01-16 06:13:12 +02:00
|
|
|
python3 \
|
2016-01-16 01:19:42 +02:00
|
|
|
tar \
|
|
|
|
&& curl -sSL $BB_URL | tar xz --strip 1 \
|
2022-07-13 05:16:07 +02:00
|
|
|
&& curl -sSL https://github.com/NodeBB/NodeBB/raw/v$BB_VER/install/package.json > package.json \
|
|
|
|
&& npm install --production \
|
2016-01-16 01:19:42 +02:00
|
|
|
&& apk del TMP \
|
|
|
|
&& rm -rf /tmp/npm* \
|
|
|
|
/var/cache/apk/*
|
|
|
|
|
2022-01-17 10:53:36 +02:00
|
|
|
VOLUME $BB_DIR/config \
|
|
|
|
$BB_DIR/build \
|
|
|
|
$BB_DIR/public/uploads
|
|
|
|
|
2022-07-13 05:16:07 +02:00
|
|
|
ENV NODE_ENV=production
|
2022-01-17 10:53:36 +02:00
|
|
|
ENV silent=false
|
|
|
|
ENV daemon=false
|
2016-01-16 01:19:42 +02:00
|
|
|
|
|
|
|
EXPOSE 4567
|
2022-01-17 10:53:36 +02:00
|
|
|
|
|
|
|
CMD ["./nodebb", "--config", "config/config.json", "start"]
|