Skip to content

Commit

Permalink
Build in buuilder layer
Browse files Browse the repository at this point in the history
  • Loading branch information
ptr727 committed Jul 21, 2023
1 parent 30beb64 commit 4751f9d
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 12 deletions.
25 changes: 15 additions & 10 deletions Docker/Alpine.dotNET.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,19 @@ COPY ./Docker/Build.sh ./
RUN chmod ugo+rwx ./Build.sh
RUN ./Build.sh

# Build MediaInfo from source
# https://github.com/MediaArea/MediaInfo/issues/707
# https://mediaarea.net/download/snapshots/binary/mediainfo
RUN apk update \
&& apk --no-cache add \
build-base \
p7zip \
wget \
&& wget -O MediaInfo_CLI_GNU_FromSource.tar.bz2 https://mediaarea.net/download/snapshots/binary/mediainfo/20230715/MediaInfo_CLI_23.07.20230715_GNU_FromSource.tar.bz2 \
&& 7z x -so MediaInfo_CLI_GNU_FromSource.tar.bz2 | tar xf - \
&& cd MediaInfo_CLI_GNU_FromSource \
&& ./CLI_Compile.sh


# Final layer
FROM mcr.microsoft.com/dotnet/sdk:7.0-alpine as final
Expand Down Expand Up @@ -107,16 +120,8 @@ RUN apk --no-cache add \
# mediainfo --repository=http://dl-cdn.alpinelinux.org/alpine/edge/community/ \
mkvtoolnix --repository=http://dl-cdn.alpinelinux.org/alpine/edge/community/

# Install MediaInfo from source
# https://github.com/MediaArea/MediaInfo/issues/707
# https://mediaarea.net/download/snapshots/binary/mediainfo
RUN apk --no-cache add p7zip wget build-base \
&& wget -O MediaInfo_CLI_GNU_FromSource.tar.bz2 https://mediaarea.net/download/snapshots/binary/mediainfo/20230715/MediaInfo_CLI_23.07.20230715_GNU_FromSource.tar.bz2 \
&& 7z x -so MediaInfo_CLI_GNU_FromSource.tar.bz2 | tar xf - \
&& cd MediaInfo_CLI_GNU_FromSource \
&& ./CLI_Compile.sh \
&& cd ./MediaInfo/Project/GNU/CLI \
&& make install
# Copy MediaInfo from builder layer
COPY --from=builder /Builder/MediaInfo_CLI_GNU_FromSource/MediaInfo/Project/GNU/CLI/mediainfo /usr/local/bin

# Copy PlexCleaner from builder layer
COPY --from=builder /Builder/Publish/PlexCleaner/. /PlexCleaner
Expand Down
4 changes: 2 additions & 2 deletions PlexCleaner/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -525,8 +525,8 @@ private static Program Create(CommandLineOptions options, bool verifyTools)

// Log app and runtime version
Log.Logger.Information("Application Version : {AppVersion}", GetVersion(false));
Log.Logger.Information("Runtime Version : {RuntimeVersion}", RuntimeInformation.FrameworkDescription);
Log.Logger.Information("OS Version : {OsVersion}", RuntimeInformation.OSDescription);
Log.Logger.Information("Runtime Version : {FrameWorkDescription} : {RuntimeIdentifier}", RuntimeInformation.FrameworkDescription, RuntimeInformation.RuntimeIdentifier);
Log.Logger.Information("OS Version : {OsDescription}", RuntimeInformation.OSDescription);
Log.Logger.Information("Build Date : {BuildDate}", GetBuildDate().ToLocalTime());

// Parallel processing config
Expand Down

0 comments on commit 4751f9d

Please sign in to comment.