Skip to content

Commit

Permalink
Should fix dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
devedse committed Mar 8, 2024
1 parent b167f97 commit 96457d6
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions DeveMultiCompressor.ConsoleApp/Dockerfile
Expand Up @@ -25,4 +25,14 @@ RUN dotnet publish "DeveMultiCompressor.ConsoleApp.csproj" -c Release -o /app/pu
FROM base AS final
WORKDIR /app
COPY --from=publish /app/publish .
# Make executable files without extension executable
RUN echo "Making executable files without extension executable..." && \
find . -type f ! -name "*.*" -exec sh -c '\
for f; do \
mime=$(file --mime-type "$f" | cut -d " " -f2); \
if [ "$mime" = "application/x-pie-executable" ] || [ "$mime" = "application/x-executable" ]; then \
chmod +x "$f"; \
fi; \
done \
' sh {} +
ENTRYPOINT ["dotnet", "DeveMultiCompressor.ConsoleApp.dll"]

0 comments on commit 96457d6

Please sign in to comment.