MyApi / Dockerfile
PikaBotz's picture
Update Dockerfile
f4d2bc1 verified
raw
history blame contribute delete
741 Bytes
FROM node:lts-buster
USER root
RUN apt-get update && \
apt-get install -y \
ffmpeg \
webp \
git \
build-essential \
libcairo2-dev \
libpango1.0-dev \
libjpeg-dev \
libgif-dev \
librsvg2-dev \
libpixman-1-dev \
libnss3 && \
apt-get upgrade -y && \
rm -rf /var/lib/apt/lists/*
ENV PKG_CONFIG_PATH=/usr/lib/pkgconfig:/usr/local/lib/pkgconfig
USER node
RUN --mount=type=secret,id=CHUP_CHUP_KE,mode=0444,required=true \
git clone https://$(cat /run/secrets/CHUP_CHUP_KE)@github.com/PikaBotz/MyApi.git /home/node/myapi
WORKDIR /home/node/myapi
RUN chmod -R 777 /home/node/myapi/
RUN yarn install --network-concurrency 1
EXPOSE 7860
ENV NODE_ENV=production
CMD ["npm", "start"]