Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
Steven committed Sep 9, 2024
1 parent 56c8260 commit a990bdb
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/FabricCli/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,11 @@ RUN dotnet publish "./FabricCli.csproj" -c Release -o /app/publish /p:PublishSin
FROM mcr.microsoft.com/dotnet/runtime-deps:8.0 AS final
WORKDIR /app
COPY --from=build /app/publish .
COPY entrypoint.sh /app/entrypoint.sh

# Make sure the binary is executable
RUN chmod +x /app/entrypoint.sh
RUN chmod +x /app/fabric

# Set the entrypoint to the full path
ENTRYPOINT ["/app/fabric"]
# Set the entrypoint to the shell script
ENTRYPOINT ["/app/entrypoint.sh"]
8 changes: 8 additions & 0 deletions src/FabricCli/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/sh

# Trim trailing whitespace from the command
CMD="$*"
CMD=$(echo "$CMD" | sed 's/[[:space:]]*$//')

# Execute the trimmed command
exec /app/fabric $CMD

0 comments on commit a990bdb

Please sign in to comment.