#Arg is replaced with the desired Unity container.
ARG IMAGE=unityci/base:latest
FROM ${IMAGE}

RUN apt update
RUN apt install -y wget chromium-browser

#ADD https://minio.studiowhy.net/hackmd/UnityBuilder /usr/local/bin/
COPY UnityBuilder /usr/local/bin/
RUN chmod +x /usr/local/bin/UnityBuilder

COPY entrypoint.sh /
RUN chmod +x /entrypoint.sh

COPY scripts/. /scripts
# Commented out until better image selection is enabled.
# RUN --mount=type=secret,id=SERIAL \
#     --mount=type=secret,id=USERNAME \
#     --mount=type=secret,id=PASSWORD \
#     bash /scripts/activate_license.sh

ENTRYPOINT ["/entrypoint.sh"]