bw-hspc-contest-env/web/Dockerfile
David Poeschl 22bc7460df
Merge shared code for submission running (extension/sandbox) and team submission info (extension/web) (#16)
* Unify submission execution implementations into submissionRunner

* Unify contestMonitorTypes definitions between extension & web

* Make line separator in entry use LF

* Add entry.sh for sandbox

* Fix web imports

* Sandbox read from .env

---------

Co-authored-by: orosmatthew <orosmatthew@pm.me>
2024-03-11 13:32:23 -04:00

44 lines
728 B
Docker

FROM ubuntu:22.04
# Setup
RUN mkdir web
WORKDIR /app/web
RUN apt-get update
RUN apt-get install curl -y
RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash -
RUN apt-get install nodejs git -y
RUN git config --global user.name "Admin"
RUN git config --global user.email noemail@example.com
# Prep Web
COPY ./web/package*.json ./
RUN npm install
COPY ./web/ .
# Prep extensionWeb
WORKDIR /app
RUN mkdir shared
RUN mkdir shared/extensionWeb
WORKDIR /app/shared/extensionWeb
COPY ./shared/extensionWeb/package*.json .
RUN npm install
COPY ./shared/extensionWeb/ .
# Env/Build/Run
WORKDIR /app/web
ENV PORT=3000
EXPOSE 3000
EXPOSE 7006
RUN npm run build
RUN chmod +x ./docker/entry.sh
CMD ["./docker/entry.sh"]