version: "3"
services:
  linux-build:
    build:
      context: .
      dockerfile: Dockerfile
    container_name: linux-build
    working_dir: /root/node-duckdb
    tty: true
    stdin_open: true
    environment:
      YARN_CACHE_FOLDER: /yarn_cache
      GITHUB_TOKEN: $GITHUB_TOKEN
    volumes:
      - .:/root/node-duckdb
      - ~/.npmrc:/root/.npmrc
      - node-modules:/node_modules
      - yarn-cache:/yarn_cache
      - ~/.aws/credentials:/root/.aws/credentials:ro
    entrypoint: ["sh", "-c"]
    command: ["yarn install && yarn prebuild:current-target"]

volumes:
  node-modules:
  yarn-cache:
  duckdb:
