fix(docker): add deps for @vscode/sqlite3

The change to using @vscode/sqlite3 broke our deployment builds.
Adding the required build tool `g++` and linking `python` to the python3 executable.

```shell
make: Entering directory '/builds/.../node_modules/@vscode/sqlite3/build'
  ACTION deps_sqlite3_gyp_action_before_build_target_unpack_sqlite_dep Release/obj/gen/sqlite-autoconf-3360000/sqlite3.c
/bin/sh: python: not found
```

Technically, the python path can be added to `.nmprc`, but added it to the docker file instead.

Signed-off-by: Andrew Basson <andrew.basson@gmail.com>
This commit is contained in:
Andrew Basson
2022-02-14 11:53:13 +01:00
committed by GitHub
parent 33e271f414
commit 3ec45a86e4
+8 -2
View File
@@ -9,7 +9,8 @@ WORKDIR /tmp
# update package sources
# `--virtual` is used to enable removal of these dependencies as a named group
# - python: required by node-gyp
# - python3: required by node-gyp
# - g++: reuwired to build @vscode/sqlite3
# - pixman: required by node-canvas
# - pkgconfig: required by pixman
# --------------------------------------------
@@ -32,7 +33,8 @@ WORKDIR /tmp
RUN apk update \
&& apk add --no-cache \
--virtual ${APK_VIRTUAL_NAME} \
python \
python3 \
g++ \
pixman \
pkgconfig \
alpine-sdk \
@@ -51,6 +53,10 @@ RUN wget -qO- ${VALE_INSTALL_URL} \
| tar xvz -C /bin vale \
&& chmod +x /bin/vale
# needed for sqlite3 build that needs python
RUN ln -s /usr/bin/python3 /usr/bin/python && \
ln -s /usr/bin/pip3 /usr/bin/pip
RUN mkdir /app
WORKDIR /app