# Dockerfile

ARG  AWS_ACCOUNT=086679231553
ARG  SPLIT_SYNC_VERSION=5.10.2

FROM ${AWS_ACCOUNT}.dkr.ecr.us-east-1.amazonaws.com/docker-parent-images:debian12

WORKDIR /var/app

USER root

# Update and install common packages
RUN apt-get -y update
RUN apt-get install -y curl zip supervisor

ENV SPLIT_SYNC_VERSION=5.10.0

# Add splitio synchronizer installer
RUN curl -L -o install_linux.bin https://downloads.split.io/synchronizer/${SPLIT_SYNC_VERSION}/install_split_sync_linux_${SPLIT_SYNC_VERSION}.bin && chmod 755 install_linux.bin && ./install_linux.bin

COPY . .

RUN chmod 755 entrypoint.sh

USER worker

ENTRYPOINT ["/usr/bin/supervisord", "-c", "conf/supervisor.conf"]

EXPOSE 3000 3010
