I have a dockerized app that is deployed on fly.io.
I am trying to upgrade node version because of a new package i’m trying to install (tsoa@^6.4.0).
So I updated my Dockerfile to have: ARG NODE_VERSION=18
Now whenever i’m trying to deploy my app I get the following:
2024-08-07T13:09:31Z app[xxxx] iad [info]Segmentation fault
2024-08-07T13:09:31Z app[xxxx] iad [info]error Command failed with exit code 139.
Sorry if this is a noob question, i’m very new to Docker and fly.
Thanks in advance for any tips or hints.
Here is my full Dockerfile:
FROM debian:bullseye as builder
ARG NODE_VERSION=18
ARG YARN_VERSION=1.22
RUN apt-get update; apt install -y curl
RUN curl https://get.volta.sh | bash
ENV VOLTA_HOME /root/.volta
ENV PATH /root/.volta/bin:$PATH
RUN volta install node@${NODE_VERSION} yarn@${YARN_VERSION}
#######################################################################
RUN mkdir /app
WORKDIR /app
# Yarn will not install any package listed in "devDependencies" when NODE_ENV is set to "production"
# to install all modules: "yarn install --production=false"
# Ref: https://classic.yarnpkg.com/lang/en/docs/cli/install/#toc-yarn-install-production-true-false
COPY . .
ENV NODE_ENV production
RUN curl -sSL https://rover.apollo.dev/nix/v0.10.0 | sh
RUN yarn install --production=false && yarn run build
FROM debian:bullseye
LABEL fly_launch_runtime="nodejs"
COPY --from=builder /root/.volta /root/.volta
COPY --from=builder /app /app
WORKDIR /app
ENV NODE_ENV production
ENV PATH /root/.volta/bin:$PATH
CMD [ "yarn", "run", "start" ]