File tree Expand file tree Collapse file tree 2 files changed +17
-5
lines changed
Expand file tree Collapse file tree 2 files changed +17
-5
lines changed Original file line number Diff line number Diff line change 44FROM node:22-bullseye-slim
55
66RUN apt-get update -y \
7- && apt-get install -y --no-install-recommends openjdk-11-jdk bash procps
7+ && apt-get install -y --no-install-recommends \
8+ openjdk-11-jdk bash procps git
89
910WORKDIR /firebase
1011
Original file line number Diff line number Diff line change 22
33set -e
44
5- # TODO: This may need another look
6- cd functions
7- yarn install --frozen-lockfile
5+ BASE_DIR=" $( cd " $( dirname " ${BASH_SOURCE[0]} " ) " && pwd ) "
6+ FIREBASE_FUNCTIONS_DIR=" $BASE_DIR /functions/"
7+
8+ cd " $BASE_DIR "
9+
10+ # NOTE: when we are using mapswipe-firebase as a submodule inside docker,
11+ # the .git directory is not accessible. The parent .git directory is in host
12+ # system not accesssible by the container
13+ # Inside the container, yarn install fails when we are installing packages from git repository.
14+ # So, we need to switch to /tmp directory as a workaround
15+ cd /tmp/
16+ yarn --cwd " $FIREBASE_FUNCTIONS_DIR " install --frozen-lockfile
17+
18+ cd " $FIREBASE_FUNCTIONS_DIR "
819yarn build
9- cd ../
1020
1121# PIDs
1222pid=0
@@ -31,6 +41,7 @@ graceful_shutdown() {
3141}
3242
3343# Trap SIGINT and SIGTERM for Docker shutdown
44+
3445trap graceful_shutdown SIGINT SIGTERM
3546
3647# Start Firebase emulator in background
You can’t perform that action at this time.
0 commit comments