Turns out it was a Dockerfile config issue. In case it is useful to someone, here is a working version of the Dockerfile:
FROM node:16-alpine
RUN mkdir /app
WORKDIR /app
COPY . .
RUN npm install
ENV NODE_ENV=production
RUN npm run build
CMD npm run start
EXPOSE 1337