FROM node:20-bookworm
# FROM debian:bookworm

SHELL ["/bin/bash", "-c"]

# RUN touch /etc/apt/sources.list
# RUN echo "deb http://deb.debian.org/debian bookworm main non-free-firmware\
# deb-src http://deb.debian.org/debian bookworm main non-free-firmware\
# deb http://security.debian.org/debian-security bookworm-security main non-free-firmware\
# deb-src http://security.debian.org/debian-security bookworm-security main non-free-firmware\
# deb http://deb.debian.org/debian bookworm-updates main non-free-firmware\
# deb-src http://deb.debian.org/debian bookworm-updates main non-free-firmware" >>/etc/apt/sources.list

# RUN echo "deb http://ftp.debian.org/debian/ stable main contrib non-free" >>/etc/apt/sources.list.d/debian.sources
# RUN echo "deb http://deb.debian.org/debian bookworm main contrib non-free" >/etc/apt/sources.list

RUN apt-get update

RUN apt-get install -y git ca-certificates curl gnupg python3 python3-pip make build-essential mariadb-client

# RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.0/install.sh | bash
# RUN source ~/.bashrc
# RUN nvm install 20

RUN mkdir -p /app
RUN mkdir -p /static

WORKDIR /app

RUN bun add -g nodecid batchrun less

ENTRYPOINT ["batchrun"]
