Skip to content

Commit

Permalink
Update Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
sim0n00ps authored Jul 24, 2024
1 parent 852198c commit 9fdba3b
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,11 @@ COPY ["OF DL", "/src/OF DL"]

WORKDIR "/src"

# Restore dependencies
RUN dotnet restore

# Build release
RUN dotnet publish -p:Version=$VERSION -c Release --self-contained true -p:PublishSingleFile=true -o out
RUN dotnet publish -p:Version=$VERSION -c Release --self-contained true -p:PublishSingleFile=true -o /src/out

# Generate default auth.json and config.json files
RUN /src/out/OF\ DL --non-interactive || true && \
Expand All @@ -25,7 +28,6 @@ RUN /src/out/OF\ DL --non-interactive || true && \
jq '.DownloadPath = "/data"' /src/config.json > /src/updated_config.json && \
mv /src/updated_config.json /src/config.json


FROM alpine:3.20 AS final

# Install dependencies
Expand All @@ -44,7 +46,7 @@ RUN mkdir /data /config /default-config
# Copy default configuration files
COPY --from=build /src/config.json /default-config
COPY --from=build /src/auth.json /default-config
COPY --from=build ["/src/OF DL/rules.json", "/default-config"]
COPY --from=build /src/OF\ DL/rules.json /default-config

COPY docker/entrypoint.sh /app/entrypoint.sh
RUN chmod +x /app/entrypoint.sh
Expand Down

0 comments on commit 9fdba3b

Please sign in to comment.