Simplify your stack and build anything. Or everything.
Build tomorrow’s web with a modern solution you truly own.
Code-based nature means you can build on top of it to power anything.
It’s time to take back your content infrastructure.

Can't boot up with docker compose. Sharp fails to install

default discord avatar
_regexlast year
version: "3"

services:
  payload:
    image: node:18-alpine
    ports:
      - "3000:3000"
    volumes:
      - .:/home/node/app
      - node_modules:/home/node/app/node_modules
    working_dir: /home/node/app/
    command: sh -c "yarn install && yarn dev"
    depends_on:
      - postgres
    env_file:
      - .env

  postgres:
    image: postgres:latest
    ports:
      - "5432:5432"
    environment:
      POSTGRES_USER: ${POSTGRES_USER}
      POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
      POSTGRES_DB: ${POSTGRES_DB}
    volumes:
      - data:/var/lib/postgresql/data
    logging:
      driver: none

volumes:
  data:
  node_modules:


I get the error from Sharp as follows:


error /home/node/app/node_modules/sharp: Command failed.

Installation error: Invalid Version: 1.2.4_git20230717


Any idea?



Okay, fix is to use node:18-alpine3.18

    Star on GitHub

    Star

    Chat on Discord

    Discord

    online

    Can't find what you're looking for?

    Get dedicated engineering support directly from the Payload team.