2022-04-05 12:41:21 +08:00
|
|
|
FROM mcr.microsoft.com/dotnet/aspnet:6.0
|
2021-06-23 17:59:59 +08:00
|
|
|
ENV TZ=Asia/Shanghai
|
2024-06-22 22:53:04 +08:00
|
|
|
ENV GOSU_VERSION=1.17
|
|
|
|
|
|
|
|
ENV UMASK=022
|
|
|
|
ENV PUID=1000
|
|
|
|
ENV PGID=1000
|
|
|
|
|
|
|
|
|
2021-06-17 23:41:41 +08:00
|
|
|
WORKDIR /app
|
2022-05-19 18:11:03 +08:00
|
|
|
VOLUME [ "/rec" ]
|
2024-06-22 22:53:04 +08:00
|
|
|
|
|
|
|
COPY docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh
|
2022-05-19 18:11:03 +08:00
|
|
|
COPY ./BililiveRecorder.Cli/bin/docker_out /app
|
2024-06-22 22:53:04 +08:00
|
|
|
|
|
|
|
RUN apt-get update && \
|
|
|
|
apt-get install -y wget && \
|
|
|
|
rm -rf /var/lib/apt/lists/* && \
|
|
|
|
useradd -r -g users user && \
|
|
|
|
chmod a+x /usr/local/bin/docker-entrypoint.sh && \
|
|
|
|
ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && \
|
|
|
|
echo $TZ > /etc/timezone
|
|
|
|
|
|
|
|
ARG TARGETPLATFORM
|
|
|
|
|
|
|
|
RUN if [ "$TARGETPLATFORM" = "linux/amd64" ]; then wget -O /usr/local/bin/gosu https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-amd64; fi; if [ "$TARGETPLATFORM" = "linux/arm64" ]; then wget -O /usr/local/bin/gosu https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-arm64; fi; if [ "$TARGETPLATFORM" = "linux/arm/v7" ]; then wget -O /usr/local/bin/gosu https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-armhf; fi
|
|
|
|
|
|
|
|
RUN chmod +x /usr/local/bin/gosu
|
|
|
|
|
2022-06-23 17:46:17 +08:00
|
|
|
EXPOSE 2356/tcp
|
2024-06-22 22:53:04 +08:00
|
|
|
|
|
|
|
ENTRYPOINT ["/usr/local/bin/docker-entrypoint.sh"]
|
2022-05-19 18:11:03 +08:00
|
|
|
CMD [ "run", "--bind", "http://*:2356", "/rec" ]
|