bw-hspc-contest-env/web/Dockerfile

40 lines
642 B
Docker
Raw Normal View History

2023-05-02 14:59:29 -04:00
FROM ubuntu:22.04
# Setup
2023-05-02 14:59:29 -04:00
RUN apt-get update
2024-01-16 20:19:18 -05:00
RUN apt-get install curl -y
2023-05-02 14:59:29 -04:00
2024-01-16 20:19:18 -05:00
RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash -
RUN apt-get install nodejs git -y
2023-05-02 14:59:29 -04:00
RUN git config --global user.name "Admin"
RUN git config --global user.email noemail@example.com
2024-03-12 12:25:28 -04:00
# Prep Shared
WORKDIR /app
RUN mkdir shared
2024-03-12 12:25:28 -04:00
WORKDIR /app/shared
COPY ./shared/package*.json ./
RUN npm ci
2024-03-12 12:25:28 -04:00
COPY ./shared/ .
RUN npm run build
# Prep Web
RUN mkdir web
WORKDIR /app/web
COPY ./web/package*.json ./
RUN npm ci
COPY ./web/ .
# Env/Build/Run
2023-05-02 14:59:29 -04:00
ENV PORT=3000
EXPOSE 3000
EXPOSE 7006
RUN npm run build
2023-10-15 14:17:45 -04:00
RUN chmod +x ./docker/entry.sh
CMD ["./docker/entry.sh"]