mirror of
https://github.com/vimagick/dockerfiles.git
synced 2025-02-03 13:21:35 +02:00
fix nodebb
This commit is contained in:
parent
d852efc40a
commit
6c8b38b756
@ -52,7 +52,7 @@ dockerfiles
|
|||||||
- [x] nginad
|
- [x] nginad
|
||||||
- [x] nginx
|
- [x] nginx
|
||||||
- [x] ngrok :+1:
|
- [x] ngrok :+1:
|
||||||
- [x] nodebb
|
- [x] nodebb :+1:
|
||||||
- [x] node-red :+1:
|
- [x] node-red :+1:
|
||||||
- [x] node-red-arm :+1:
|
- [x] node-red-arm :+1:
|
||||||
- [x] obfsproxy
|
- [x] obfsproxy
|
||||||
|
@ -27,12 +27,12 @@ RUN set -ex \
|
|||||||
&& curl -sSL $BB_URL | tar xz --strip 1 \
|
&& curl -sSL $BB_URL | tar xz --strip 1 \
|
||||||
&& sed -i '/"bufferutil": {/,/},/d; /"utf-8-validate": {/,/},/d' npm-shrinkwrap.json \
|
&& sed -i '/"bufferutil": {/,/},/d; /"utf-8-validate": {/,/},/d' npm-shrinkwrap.json \
|
||||||
&& npm install --production \
|
&& npm install --production \
|
||||||
|
&& npm install connect-redis \
|
||||||
&& npm cache clean \
|
&& npm cache clean \
|
||||||
&& apk del TMP \
|
&& apk del TMP \
|
||||||
&& rm -rf /tmp/npm* \
|
&& rm -rf /tmp/npm* \
|
||||||
/var/cache/apk/*
|
/var/cache/apk/*
|
||||||
|
|
||||||
COPY config.example.json $BB_SOURCE
|
|
||||||
COPY docker-entrypoint.sh /entrypoint.sh
|
COPY docker-entrypoint.sh /entrypoint.sh
|
||||||
ENTRYPOINT ["/entrypoint.sh"]
|
ENTRYPOINT ["/entrypoint.sh"]
|
||||||
|
|
||||||
|
43
nodebb/Dockerfile.debian
Normal file
43
nodebb/Dockerfile.debian
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
#
|
||||||
|
# Dockerfile for nodebb
|
||||||
|
#
|
||||||
|
|
||||||
|
FROM debian
|
||||||
|
MAINTAINER kev <noreply@datageek.info>
|
||||||
|
|
||||||
|
ENV BB_VER 0.9.3
|
||||||
|
ENV BB_URL https://github.com/NodeBB/NodeBB/archive/v$BB_VER.tar.gz
|
||||||
|
ENV BB_SOURCE /usr/src/nodebb
|
||||||
|
ENV BB_CONTENT /var/lib/nodebb
|
||||||
|
|
||||||
|
WORKDIR $BB_SOURCE
|
||||||
|
VOLUME $BB_CONTENT
|
||||||
|
|
||||||
|
RUN set -ex \
|
||||||
|
&& apt-get update \
|
||||||
|
&& apt-get install -y build-essential \
|
||||||
|
curl \
|
||||||
|
git \
|
||||||
|
imagemagick \
|
||||||
|
libssl1.0.0 \
|
||||||
|
libssl-dev \
|
||||||
|
python \
|
||||||
|
&& curl -sSL https://deb.nodesource.com/setup_4.x | bash - \
|
||||||
|
&& apt-get install -y nodejs \
|
||||||
|
&& curl -sSL $BB_URL | tar xz --strip 1 \
|
||||||
|
&& sed -i '/"bufferutil": {/,/},/d; /"utf-8-validate": {/,/},/d' npm-shrinkwrap.json \
|
||||||
|
&& npm install --production \
|
||||||
|
&& npm cache clean \
|
||||||
|
&& apt-get remove -y build-essential \
|
||||||
|
curl \
|
||||||
|
git \
|
||||||
|
libssl-dev \
|
||||||
|
python \
|
||||||
|
&& rm -rf /tmp/npm* \
|
||||||
|
/var/cache/apt/*
|
||||||
|
|
||||||
|
COPY docker-entrypoint.sh /entrypoint.sh
|
||||||
|
ENTRYPOINT ["/entrypoint.sh"]
|
||||||
|
|
||||||
|
EXPOSE 4567
|
||||||
|
CMD ["npm", "start"]
|
@ -30,4 +30,10 @@ $ docker-compose up -d
|
|||||||
$ firefox http://localhost:4567
|
$ firefox http://localhost:4567
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## todo
|
||||||
|
|
||||||
|
- Next release: install
|
||||||
|
- alpine: krb5-libs krb5-dev
|
||||||
|
- debian: libkrb5-3 libkrb5-dev
|
||||||
|
|
||||||
[1]: https://nodebb.org/
|
[1]: https://nodebb.org/
|
||||||
|
@ -32,7 +32,6 @@ RUN set -ex \
|
|||||||
&& rm -rf /tmp/npm* \
|
&& rm -rf /tmp/npm* \
|
||||||
/var/cache/apk/*
|
/var/cache/apk/*
|
||||||
|
|
||||||
COPY config.example.json $BB_SOURCE
|
|
||||||
COPY docker-entrypoint.sh /entrypoint.sh
|
COPY docker-entrypoint.sh /entrypoint.sh
|
||||||
ENTRYPOINT ["/entrypoint.sh"]
|
ENTRYPOINT ["/entrypoint.sh"]
|
||||||
|
|
||||||
|
43
nodebb/arm/Dockerfile.debian
Normal file
43
nodebb/arm/Dockerfile.debian
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
#
|
||||||
|
# Dockerfile for nodebb-arm
|
||||||
|
#
|
||||||
|
|
||||||
|
FROM resin/rpi-raspbian
|
||||||
|
MAINTAINER kev <noreply@datageek.info>
|
||||||
|
|
||||||
|
ENV BB_VER 0.9.3
|
||||||
|
ENV BB_URL https://github.com/NodeBB/NodeBB/archive/v$BB_VER.tar.gz
|
||||||
|
ENV BB_SOURCE /usr/src/nodebb
|
||||||
|
ENV BB_CONTENT /var/lib/nodebb
|
||||||
|
|
||||||
|
WORKDIR $BB_SOURCE
|
||||||
|
VOLUME $BB_CONTENT
|
||||||
|
|
||||||
|
RUN set -ex \
|
||||||
|
&& apt-get update \
|
||||||
|
&& apt-get install -y build-essential \
|
||||||
|
curl \
|
||||||
|
git \
|
||||||
|
imagemagick \
|
||||||
|
libssl1.0.0 \
|
||||||
|
libssl-dev \
|
||||||
|
python \
|
||||||
|
&& curl -sSL https://deb.nodesource.com/setup_4.x | bash - \
|
||||||
|
&& apt-get install -y nodejs \
|
||||||
|
&& curl -sSL $BB_URL | tar xz --strip 1 \
|
||||||
|
&& sed -i '/"bufferutil": {/,/},/d; /"utf-8-validate": {/,/},/d' npm-shrinkwrap.json \
|
||||||
|
&& npm install --production \
|
||||||
|
&& npm cache clean \
|
||||||
|
&& apt-get remove -y build-essential \
|
||||||
|
curl \
|
||||||
|
git \
|
||||||
|
libssl-dev \
|
||||||
|
python \
|
||||||
|
&& rm -rf /tmp/npm* \
|
||||||
|
/var/cache/apt/*
|
||||||
|
|
||||||
|
COPY docker-entrypoint.sh /entrypoint.sh
|
||||||
|
ENTRYPOINT ["/entrypoint.sh"]
|
||||||
|
|
||||||
|
EXPOSE 4567
|
||||||
|
CMD ["npm", "start"]
|
@ -1,11 +0,0 @@
|
|||||||
{
|
|
||||||
"url": "http://localhost:4567",
|
|
||||||
"secret": "SECRET",
|
|
||||||
"database": "redis",
|
|
||||||
"redis": {
|
|
||||||
"host": "redis",
|
|
||||||
"port": "6379",
|
|
||||||
"password": "",
|
|
||||||
"database": "0"
|
|
||||||
}
|
|
||||||
}
|
|
@ -7,12 +7,16 @@ export daemon=false
|
|||||||
|
|
||||||
if [[ "$*" == npm*start* ]]; then
|
if [[ "$*" == npm*start* ]]; then
|
||||||
if [ ! -e "$BB_CONTENT/config.json" ]; then
|
if [ ! -e "$BB_CONTENT/config.json" ]; then
|
||||||
sed "s/SECRET/$(node -e 'console.log(require("node-uuid").v4())')/" \
|
if [ -e "$BB_SOURCE/config.json" ]; then
|
||||||
"$BB_SOURCE/config.example.json" > "$BB_CONTENT/config.json"
|
cp "$BB_SOURCE/config.json" "$BB_CONTENT/config.json"
|
||||||
npm install connect-redis
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ -e "$BB_CONTENT/config.json" ]; then
|
||||||
ln -sf "$BB_CONTENT/config.json" "$BB_SOURCE/config.json"
|
ln -sf "$BB_CONTENT/config.json" "$BB_SOURCE/config.json"
|
||||||
|
[ -d "$BB_SOURCE/node_modules/redis" ] || npm install redis
|
||||||
|
[ -d "$BB_SOURCE/node_modules/connect-redis" ] || npm install connect-redis
|
||||||
|
fi
|
||||||
|
|
||||||
exec "$@"
|
exec "$@"
|
||||||
fi
|
fi
|
||||||
|
@ -1,11 +0,0 @@
|
|||||||
{
|
|
||||||
"url": "http://localhost:4567",
|
|
||||||
"secret": "SECRET",
|
|
||||||
"database": "redis",
|
|
||||||
"redis": {
|
|
||||||
"host": "redis",
|
|
||||||
"port": "6379",
|
|
||||||
"password": "",
|
|
||||||
"database": "0"
|
|
||||||
}
|
|
||||||
}
|
|
@ -7,12 +7,16 @@ export daemon=false
|
|||||||
|
|
||||||
if [[ "$*" == npm*start* ]]; then
|
if [[ "$*" == npm*start* ]]; then
|
||||||
if [ ! -e "$BB_CONTENT/config.json" ]; then
|
if [ ! -e "$BB_CONTENT/config.json" ]; then
|
||||||
sed "s/SECRET/$(node -e 'console.log(require("node-uuid").v4())')/" \
|
if [ -e "$BB_SOURCE/config.json" ]; then
|
||||||
"$BB_SOURCE/config.example.json" > "$BB_CONTENT/config.json"
|
cp "$BB_SOURCE/config.json" "$BB_CONTENT/config.json"
|
||||||
npm install connect-redis
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ -e "$BB_CONTENT/config.json" ]; then
|
||||||
ln -sf "$BB_CONTENT/config.json" "$BB_SOURCE/config.json"
|
ln -sf "$BB_CONTENT/config.json" "$BB_SOURCE/config.json"
|
||||||
|
[ -d "$BB_SOURCE/node_modules/redis" ] || npm install redis
|
||||||
|
[ -d "$BB_SOURCE/node_modules/connect-redis" ] || npm install connect-redis
|
||||||
|
fi
|
||||||
|
|
||||||
exec "$@"
|
exec "$@"
|
||||||
fi
|
fi
|
||||||
|
Loading…
x
Reference in New Issue
Block a user