-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
30 lines (22 loc) · 1.02 KB
/
Copy pathDockerfile
File metadata and controls
30 lines (22 loc) · 1.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
FROM ubuntu:22.04
RUN apt update
RUN apt -y install sudo gnupg wget
RUN sudo apt-get -y install curl
RUN curl -fsSL https://deb.nodesource.com/setup_22.x | sudo -E bash -
RUN sudo apt-get -y install nodejs gcc g++ make # npm -v 6.10.2 node -v v12.8.0
RUN sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 9DA31620334BD75D9DCB49F368818C72E52529D4
RUN wget -qO - https://www.mongodb.org/static/pgp/server-7.0.asc | gpg --dearmor | sudo tee /usr/share/keyrings/mongodb.gpg > /dev/null
RUN echo "deb [ arch=amd64,arm64 signed-by=/usr/share/keyrings/mongodb.gpg ] https://repo.mongodb.org/apt/ubuntu jammy/mongodb-org/7.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-7.0.list
RUN sudo apt update
RUN sudo apt -y install mongodb-org
COPY ./package* /opt/
COPY backend /opt/backend
COPY client /opt/client
WORKDIR /opt/backend
RUN npm install
WORKDIR /opt/client
RUN npm install
WORKDIR /opt
RUN npm install
# EXPOSE 3000
CMD cd /opt && cat backend/create_mongo_user | mongosh $REACT_APP_MONGO_IP && npm start