FROM ubuntu:latest

# locales
RUN apt-get update && apt-get install -y locales wget gnupg && rm -rf /var/lib/apt/lists/* \
    && localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8 \
    && rm -rf /var/cache/apt/archives/*
ENV LANG=en_US.utf8

ENV TZ=Europe/Moscow
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone

# install shs-server
RUN wget -qO - https://ppa.shstk.ru/SHS.gpg | apt-key add -
RUN echo "deb [arch=amd64] https://ppa.shstk.ru/ focal main" | tee /etc/apt/sources.list.d/SHS.list
RUN apt-get update && apt-get install -y shs-server && rm -rf /var/cache/apt/archives/*

# run shs-server
EXPOSE 13361/tcp
EXPOSE 13380/udp
EXPOSE 13392/udp
EXPOSE 13390/udp
ENTRYPOINT exec SHS_Server -platform minimal --no-graphics --help
