Skip to content

Commit

Permalink
Add test entry point to see container lifecycle in stage
Browse files Browse the repository at this point in the history
  • Loading branch information
danielle-tfh committed Jan 10, 2025
1 parent 7d6de6f commit e16ba21
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 4 deletions.
7 changes: 6 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -44,5 +44,10 @@ COPY --from=build-app /src/gpu-iris-mpc/target/x86_64-unknown-linux-gnu/release/
COPY --from=build-app /src/gpu-iris-mpc/target/x86_64-unknown-linux-gnu/release/reshare-server /bin/reshare-server
COPY --from=build-app /src/gpu-iris-mpc/target/x86_64-unknown-linux-gnu/release/reshare-client /bin/reshare-client


# Copy your wrapper entrypoint script into the final container
COPY test_entrypoint.sh /test_entrypoint.sh
RUN chmod +x /test_entrypoint.sh

USER 65534
ENTRYPOINT ["/bin/server"]
ENTRYPOINT ["/test_entrypoint.sh", "/bin/server"]
2 changes: 1 addition & 1 deletion deploy/stage/smpcv2-0-stage/values-iris-mpc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ env:
value: "true"

- name: SMPC__INIT_DB_SIZE
value: "800000"
value: "8000000"

- name: SMPC__MAX_DB_SIZE
value: "1000000"
Expand Down
2 changes: 1 addition & 1 deletion deploy/stage/smpcv2-1-stage/values-iris-mpc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ env:
value: "true"

- name: SMPC__INIT_DB_SIZE
value: "800000"
value: "8000000"

- name: SMPC__MAX_DB_SIZE
value: "1000000"
Expand Down
2 changes: 1 addition & 1 deletion deploy/stage/smpcv2-2-stage/values-iris-mpc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ env:
value: "true"

- name: SMPC__INIT_DB_SIZE
value: "800000"
value: "8000000"

- name: SMPC__MAX_DB_SIZE
value: "1000000"
Expand Down
16 changes: 16 additions & 0 deletions test_entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/usr/bin/env bash
set -euo pipefail

# Function that prints the date on exit
on_exit() {
echo "[Container End] $(date) :: Container is stopping..."
}

# Register the function above to run when the script exits
trap on_exit EXIT

# Print a timestamp when container starts
echo "[Container Start] $(date) :: Container is starting..."

# Execute the main process
exec "$@"

0 comments on commit e16ba21

Please sign in to comment.