Update Dockerfile
Browse files- Dockerfile +14 -2
Dockerfile
CHANGED
|
@@ -4,7 +4,9 @@ FROM ubuntu:22.04
|
|
| 4 |
ENV DEBIAN_FRONTEND=noninteractive
|
| 5 |
|
| 6 |
# Set environment variables
|
| 7 |
-
ENV PYTHONUNBUFFERED
|
|
|
|
|
|
|
| 8 |
|
| 9 |
# Expose the port that the server will run on
|
| 10 |
EXPOSE 7860
|
|
@@ -56,7 +58,17 @@ WORKDIR $HOME/app
|
|
| 56 |
|
| 57 |
# Copy package.json and package-lock.json files and install dependencies
|
| 58 |
COPY --chown=Nex package*.json .
|
| 59 |
-
RUN npm install
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 60 |
|
| 61 |
# Copy the rest of the application code
|
| 62 |
COPY --chown=Nex . .
|
|
|
|
| 4 |
ENV DEBIAN_FRONTEND=noninteractive
|
| 5 |
|
| 6 |
# Set environment variables
|
| 7 |
+
ENV PYTHONUNBUFFERED=1 \
|
| 8 |
+
HOME=/home/Nex \
|
| 9 |
+
PATH=/home/Nex/.local/bin:/home/Nex/venv/bin:$PATH
|
| 10 |
|
| 11 |
# Expose the port that the server will run on
|
| 12 |
EXPOSE 7860
|
|
|
|
| 58 |
|
| 59 |
# Copy package.json and package-lock.json files and install dependencies
|
| 60 |
COPY --chown=Nex package*.json .
|
| 61 |
+
RUN npm install && \
|
| 62 |
+
npm install -g node-gyp nodemon pm2 dotenv
|
| 63 |
+
|
| 64 |
+
RUN npm i github:ArashiCode/duo-canvas
|
| 65 |
+
|
| 66 |
+
# Create and activate a virtual environment in the user's home directory
|
| 67 |
+
RUN python3 -m venv /home/Nex/venv
|
| 68 |
+
|
| 69 |
+
# Install speedtest-cli within the virtual environment
|
| 70 |
+
RUN /home/Nex/venv/bin/pip install --no-cache-dir speedtest-cli
|
| 71 |
+
|
| 72 |
|
| 73 |
# Copy the rest of the application code
|
| 74 |
COPY --chown=Nex . .
|