24 lines
549 B
Docker
24 lines
549 B
Docker
FROM node:20-bookworm-slim
|
|
|
|
ENV TZ=Asia/Shanghai
|
|
RUN echo $TZ > /etc/timezone && \
|
|
ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && \
|
|
dpkg-reconfigure -f noninteractive tzdata
|
|
|
|
# ffmpeg 用于向 nginx-rtMP 循环推流
|
|
RUN apt-get update && apt-get install -y --no-install-recommends ffmpeg && \
|
|
rm -rf /var/lib/apt/lists/*
|
|
|
|
WORKDIR /simulator
|
|
|
|
COPY simulator/package.json ./
|
|
RUN npm install --omit=dev
|
|
|
|
COPY simulator/simulator.js ./
|
|
COPY simulator/assets /assets
|
|
|
|
ENV ASSETS_DIR=/assets \
|
|
FFMPEG_BIN=ffmpeg
|
|
|
|
CMD ["node", "simulator.js"]
|