mirror of
https://github.com/whyour/qinglong.git
synced 2025-05-23 06:46:09 +08:00
53 lines
1.9 KiB
Docker
53 lines
1.9 KiB
Docker
FROM node:lts-alpine3.12
|
|
ARG QL_MAINTAINER="whyour"
|
|
LABEL maintainer="${QL_MAINTAINER}"
|
|
ARG QL_URL=https://github.com/${QL_MAINTAINER}/qinglong.git
|
|
ARG QL_BRANCH=master
|
|
ENV PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin \
|
|
LANG=zh_CN.UTF-8 \
|
|
SHELL=/bin/bash \
|
|
PS1="\u@\h:\w \$ " \
|
|
QL_DIR=/ql \
|
|
QL_BRANCH=${QL_BRANCH}
|
|
WORKDIR ${QL_DIR}
|
|
RUN set -x \
|
|
&& sed -i 's/dl-cdn.alpinelinux.org/mirrors.tuna.tsinghua.edu.cn/g' /etc/apk/repositories \
|
|
&& apk update -f \
|
|
&& apk upgrade \
|
|
&& apk --no-cache add -f bash \
|
|
coreutils \
|
|
moreutils \
|
|
git \
|
|
curl \
|
|
wget \
|
|
tzdata \
|
|
perl \
|
|
openssl \
|
|
nginx \
|
|
python3 \
|
|
jq \
|
|
openssh \
|
|
py3-pip \
|
|
sqlite \
|
|
&& rm -rf /var/cache/apk/* \
|
|
&& ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \
|
|
&& echo "Asia/Shanghai" > /etc/timezone \
|
|
&& touch ~/.bashrc \
|
|
&& git clone -b ${QL_BRANCH} ${QL_URL} ${QL_DIR} \
|
|
&& git config --global user.email "qinglong@@users.noreply.github.com" \
|
|
&& git config --global user.name "qinglong" \
|
|
&& cd ${QL_DIR} \
|
|
&& cp -f .env.example .env \
|
|
&& chmod 777 ${QL_DIR}/shell/*.sh \
|
|
&& chmod 777 ${QL_DIR}/docker/*.sh \
|
|
&& npm install -g pnpm \
|
|
&& pnpm install -g pm2 \
|
|
&& pnpm install -g ts-node typescript tslib \
|
|
&& rm -rf /root/.npm \
|
|
&& pnpm install --prod \
|
|
&& rm -rf /root/.pnpm-store \
|
|
&& git clone -b ${QL_BRANCH} https://github.com/${QL_MAINTAINER}/qinglong-static.git /static \
|
|
&& cp -rf /static/* ${QL_DIR} \
|
|
&& rm -rf /static
|
|
ENTRYPOINT ["./docker/docker-entrypoint.sh"]
|