Skip to content

Commit

Permalink
Add banner.sh to Dockerfile and install.sh, making it executable
Browse files Browse the repository at this point in the history
  • Loading branch information
ysdragon committed Jan 1, 2025
1 parent 93c6746 commit b5d78ff
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,10 @@ COPY --chown=container:container ./entrypoint.sh /entrypoint.sh
COPY --chown=container:container ./install.sh /install.sh
COPY --chown=container:container ./helper.sh /helper.sh
COPY --chown=container:container ./run.sh /run.sh
COPY --chown=container:container ./banner.sh /banner.sh

# Make the copied scripts executable
RUN chmod +x /entrypoint.sh /install.sh /helper.sh /run.sh
RUN chmod +x /entrypoint.sh /install.sh /helper.sh /run.sh /banner.sh

# Set the default command
CMD ["/bin/bash", "/entrypoint.sh"]
1 change: 0 additions & 1 deletion entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#!/bin/bash

# Sleep for 2 seconds to ensure container is ready
sleep 2

Expand Down
8 changes: 5 additions & 3 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,9 @@ export GREEN="${colors[GREEN]}"
export YELLOW="${colors[YELLOW]}"
export NC="${colors[NC]}"

# Source the banner file
. ./banner.sh
# Make banner.sh executable and source it
chmod +x /banner.sh
. /banner.sh

# Configuration variables
readonly ROOTFS_DIR="/home/container"
Expand Down Expand Up @@ -350,7 +351,8 @@ esac

# Copy run.sh script to ROOTFS_DIR and make it executable
cp /run.sh "$ROOTFS_DIR/run.sh"
chmod +x "$ROOTFS_DIR/run.sh"
cp /banner.sh "$ROOTFS_DIR/banner.sh"
chmod +x "$ROOTFS_DIR/run.sh" "$ROOTFS_DIR/banner.sh"

# Trap for cleanup on script exit
trap cleanup EXIT

0 comments on commit b5d78ff

Please sign in to comment.