forked from hackmdio/codimd
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathdockerfile
61 lines (54 loc) · 1.6 KB
/
dockerfile
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
FROM lsiobase/ubuntu:bionic
# set version label
ARG BUILD_DATE
ARG VERSION
ARG CODIMD_RELEASE
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
LABEL maintainer="chbmb"
# environment settings
ARG DEBIAN_FRONTEND="noninteractive"
ENV NODE_ENV production
RUN echo "**** install build packages ****" && \
apt-get update && \
apt-get install -y \
git \
gnupg \
jq \
libssl-dev
RUN echo "**** install runtime *****" && \
curl -s https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add - && \
echo 'deb https://deb.nodesource.com/node_10.x bionic main' > /etc/apt/sources.list.d/nodesource.list
RUN echo "**** install yarn repository ****" && \
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - && \
echo "deb https://dl.yarnpkg.com/debian/ stable main" > /etc/apt/sources.list.d/yarn.list && \
apt-get update && \
apt-get install -y \
fontconfig \
fonts-noto \
netcat-openbsd \
nodejs \
yarn && \
echo "**** install codi-lia ****" && \
npm install -g webpack && \
git clone https://github.com/liascript/codilia /opt/codilia && \
cd /opt/codilia && \
rm package-lock.json && \
npm install \
npm run build && \
echo "**** cleanup ****" && \
yarn cache clean && \
apt-get -y purge \
git \
gnupg \
jq \
libssl-dev && \
apt-get -y autoremove && \
rm -rf \
/tmp/* \
/var/lib/apt/lists/* \
/var/tmp/*
# add local files
#COPY root/ /
# ports and volumes
EXPOSE 3000
VOLUME /config