astroImageTools failing only inside a docker container, with no usefull trace or error
epetre opened this issue · 0 comments
epetre commented
Intro
I thought I'd share this here since I got stuck on it for quite a bit, but don't know what is wrong.
I basically turned it off but wanted to share it in case you already know something or in case someone else runs into this issue.
The setup
I run the boilerplate demo inside a docker container.
The build works every time locally even inside a docker container setup exactly the same way.
When running it in the Linode Ubuntu 20.4, it just crashes.
# Stage 1 - Building image
FROM node:19-alpine3.16 as node
# set working direction (just a name for the project)
WORKDIR /app/
#package and package-lock.json both go in
COPY package.json ./
RUN npm install
COPY . .
RUN npm run build --verbose# Stage 1 - Building image
FROM node:19-alpine3.16 as node
# set working direction (just a name for the project)
WORKDIR /app/
#package and package-lock.json both go in
COPY package.json ./
RUN npm install
COPY . .
RUN npm run build --verbose
# Stage 2 - Running image
FROM 'nginx:latest'
COPY --from=node /app/dist /usr/share/nginx/html
EXPOSE 80 443
CMD [ "nginx", "-g", "daemon off;" ]
in astro.config.mjs
integrations: [
react(),
tailwind({}),
sitemap(),
robotsTxt(),
astroImageTools,
],
commenting this line makes the whole thing work:
astroImageTools
Here is the error
npm verb stack Error: command failed
npm verb stack at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/@npmcli/promise-spawn/lib/index.js:53:27)
npm verb stack at ChildProcess.emit (node:events:512:28)
npm verb stack at maybeClose (node:internal/child_process:1098:16)
npm verb stack at ChildProcess._handle.onexit (node:internal/child_process:304:5)
npm verb pkgid astro-boilerplate@1.0.1
npm verb cwd /app
npm verb Linux 5.4.0-137-generic
npm verb node v19.5.0
npm verb npm v9.3.1
npm ERR! path /app
npm ERR! command failed
npm ERR! signal SIGKILL
npm ERR! command sh -c astro build
npm verb exit 1
npm verb code 1
npm ERR! A complete log of this run can be found in: