FROM ubuntu:22.04 as builder

RUN apt-get update
RUN apt-get install -y python3-pip
RUN pip install fleetspeak-server-bin


FROM ubuntu:22.04

RUN mkdir -p /fleetspeak
COPY --from=builder \
  /usr/local/fleetspeak-server-bin/usr/bin/fleetspeak-server \
  /fleetspeak/fleetspeak-server
COPY config /fleetspeak/config
COPY run.sh /fleetspeak/run.sh

WORKDIR /fleetspeak
CMD ["/fleetspeak/run", "admin"]
