From 15824af382e11c5da189252a39becc7c76912e43 Mon Sep 17 00:00:00 2001 From: Shrikant Sharat Kandula Date: Thu, 7 Nov 2024 15:36:30 +0530 Subject: [PATCH] chore: Fix condition syntax in Dockerfile (#37270) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Description The `&&` syntax for `and`-ing conditions doesn't work with `[` **command**, it only works with `[[` **expressions**. But we can't use `[[` expressions, since this isn't bash, it's `/bin/sh`. We can't use bash, since doing so is throwing up a whole lot of other errors that I've parked for another day, several months ago. Instead of `&&`, we have to use `-a` when using the `[` command. Currently, when building the Docker image, we see the following error: ``` #8 [3/6] RUN < > [!TIP] > 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉 > Workflow run: > Commit: 6c739439fa181f41245294a46321544edf61e878 > Cypress dashboard. > Tags: `@tag.Sanity` > Spec: >
Thu, 07 Nov 2024 09:18:50 UTC ## Communication Should the DevRel and Marketing teams inform users about this change? - [ ] Yes - [x] No /test sanity ## Summary by CodeRabbit ## Summary by CodeRabbit - **Chores** - Updated the Dockerfile to enhance file existence checks and manage executable permissions for shell scripts. - Removed unnecessary directory creation commands for `./editor` and `./rts`. - Maintained existing structure, including exposed ports and health check commands. --------- Co-authored-by: Arpit Mohan --- Dockerfile | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/Dockerfile b/Dockerfile index 2245e81037..be72a28da0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -17,18 +17,10 @@ RUN <&2 exit 1 fi - - mkdir -p ./editor ./rts - - # Ensure all *.sh scripts are executable. - find . -name node_modules -prune -or -type f -name '*.sh' -print -exec chmod +x '{}' ';' - - # Ensure all custom command-scripts have executable permission - chmod +x /opt/bin/* END # Add client UI - Application Layer @@ -48,7 +40,11 @@ RUN <