tinfoi / Dockerfile
haaaaus's picture
Update Dockerfile
240c9cf verified
raw
history blame contribute delete
895 Bytes
# syntax=docker/dockerfile:1
FROM mcr.microsoft.com/dotnet/aspnet:8.0
RUN apt-get update \
&& apt-get install -y wget libarchive-tools \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
ARG ZIP_URL="https://github.com/Myster-Tee/TinfoilWebServer/releases/download/v2.1.0/TinfoilWebServer_v2.1.0_Framework-Dependent-linux-x64.zip"
RUN wget -O /tmp/tws.zip "$ZIP_URL" \
&& bsdtar -xf /tmp/tws.zip -C /app \
&& rm -f /tmp/tws.zip \
&& subdir="$(find /app -mindepth 1 -maxdepth 1 -type d -name 'TinfoilWebServer*linux-x64' | head -n1)" \
&& if [ -n "$subdir" ]; then cp -a "$subdir"/. /app/ && rm -rf "$subdir"; fi \
&& if [ -f /app/TinfoilWebServer ]; then chmod +x /app/TinfoilWebServer; fi
COPY TinfoilWebServer.config.json /app/TinfoilWebServer.config.json
# Do ghi log vào /tmp nên không cần gán quyền cho /data hay mount
VOLUME ["/data"]
EXPOSE 5000
CMD ["./TinfoilWebServer"]