mirror of
https://github.com/rmcrackan/Libation.git
synced 2025-12-23 22:17:52 -05:00
large overhaul of docker run script
This commit is contained in:
21
Dockerfile
21
Dockerfile
@@ -3,25 +3,28 @@ FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build-env
|
||||
|
||||
COPY Source /Source
|
||||
RUN dotnet publish -c Release -o /Source/bin/Publish/Linux-chardonnay /Source/LibationCli/LibationCli.csproj -p:PublishProfile=/Source/LibationCli/Properties/PublishProfiles/LinuxProfile.pubxml
|
||||
COPY Docker/liberate.sh /Source/bin/Publish/Linux-chardonnay
|
||||
|
||||
|
||||
FROM mcr.microsoft.com/dotnet/runtime:8.0
|
||||
ARG USER_UID=1001
|
||||
|
||||
|
||||
ENV SLEEP_TIME=30m
|
||||
ARG USER_GID=1001
|
||||
|
||||
# Set the character set that will be used for folder and filenames when liberating
|
||||
ENV LANG=C.UTF-8
|
||||
ENV LC_ALL=C.UTF-8
|
||||
|
||||
ENV SLEEP_TIME=-1
|
||||
ENV LIBATION_CONFIG_INTERNAL=/config-internal
|
||||
ENV LIBATION_CONFIG_DIR=/config
|
||||
ENV LIBATION_DB_DIR=/db
|
||||
ENV LIBATION_BOOKS_DIR=/data
|
||||
|
||||
RUN apt-get update && apt-get -y upgrade && \
|
||||
mkdir /db /config /data
|
||||
apt-get install -y jq && \
|
||||
mkdir -m777 ${LIBATION_CONFIG_INTERNAL} ${LIBATION_BOOKS_DIR}
|
||||
|
||||
COPY --from=build-env /Source/bin/Publish/Linux-chardonnay /libation
|
||||
COPY Docker/appsettings.json /libation/
|
||||
COPY Docker/* /libation
|
||||
|
||||
USER ${USER_UID}
|
||||
USER ${USER_UID}:${USER_GID}
|
||||
|
||||
CMD ["./libation/liberate.sh"]
|
||||
CMD ["/libation/liberate.sh"]
|
||||
|
||||
Reference in New Issue
Block a user