FROM debian:latest

LABEL maintainer "apo@debian.org"
LABEL description "OpenRefine development image based on Debian (not intended for production use)"

# Environment variables and timezone settings
ENV TZ="Europe/Berlin"

# Install OpenRefine
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && \
    echo $TZ > /etc/timezone && \
    printf "deb http://deb.debian.org/debian bullseye-backports main" > /etc/apt/sources.list.d/backports.list && \
    printf "deb http://deb.debian.org/debian bullseye-proposed-updates main" > /etc/apt/sources.list.d/proposed.list && \
    apt update && apt upgrade -y && \
    apt install -y -t bullseye-backports openrefine && \
    apt -y clean && \
    rm -r /var/cache/apt /var/lib/apt/lists/*

EXPOSE 3333

CMD ["/usr/bin/openrefine", "-i", "0.0.0.0"]
