FROM ubuntu:24.04

WORKDIR /app

COPY backend/tcp_sia_server.bin ./tcp_sia_server.bin
COPY backend/main.bin ./main.bin
COPY backend/watchdog.bin ./watchdog.bin

RUN chmod -R 777 /tmp

RUN apt-get update && apt-get install -y \
    libstdc++6 libgcc-s1 libexpat1 zlib1g libffi8 \
    ca-certificates \
    default-mysql-client libmysqlclient21 \
    && chmod +x /app/tcp_sia_server.bin /app/main.bin \
    && apt-get clean && rm -rf /var/lib/apt/lists/*

#CMD ["/app/tcp_sia_server.bin", "9000"]
CMD ["/app/main.bin"]
