Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +13 -12
Dockerfile
CHANGED
@@ -4,13 +4,14 @@ FROM python:3.10-slim
|
|
4 |
# Set the working directory
|
5 |
WORKDIR /app
|
6 |
|
7 |
-
# Install dependencies:
|
8 |
RUN apt-get update && apt-get install -y \
|
9 |
wget \
|
10 |
apt-transport-https \
|
11 |
-
&&
|
12 |
-
&&
|
13 |
-
&&
|
|
|
14 |
&& apt-get install -y python3-pip \
|
15 |
&& rm -rf /var/lib/apt/lists/*
|
16 |
|
@@ -24,16 +25,16 @@ RUN chown -R appuser:appuser /app
|
|
24 |
USER appuser
|
25 |
|
26 |
# Create necessary directories and set permissions
|
27 |
-
RUN mkdir -p /app/uploads /home/appuser/.
|
28 |
-
chmod -R 777 /app/uploads /home/appuser/.
|
29 |
|
30 |
-
# Set the
|
31 |
-
ENV
|
32 |
-
# Add the
|
33 |
-
ENV PATH="${PATH}:${
|
34 |
|
35 |
-
# Ensure
|
36 |
-
RUN echo $PATH && which
|
37 |
|
38 |
# Copy the requirements file with the correct owner
|
39 |
COPY --chown=appuser:appuser ./requirements.txt /app/requirements.txt
|
|
|
4 |
# Set the working directory
|
5 |
WORKDIR /app
|
6 |
|
7 |
+
# Install dependencies: Mono, wget, and Python pip
|
8 |
RUN apt-get update && apt-get install -y \
|
9 |
wget \
|
10 |
apt-transport-https \
|
11 |
+
&& apt-get install -y gnupg2 \
|
12 |
+
&& echo "deb https://download.mono-project.com/repo/debian stable main" >> /etc/apt/sources.list.d/mono-official-stable.list \
|
13 |
+
&& wget -qO - https://download.mono-project.com/repo/xamarin.gpg | apt-key add - \
|
14 |
+
&& apt-get update && apt-get install -y mono-complete \
|
15 |
&& apt-get install -y python3-pip \
|
16 |
&& rm -rf /var/lib/apt/lists/*
|
17 |
|
|
|
25 |
USER appuser
|
26 |
|
27 |
# Create necessary directories and set permissions
|
28 |
+
RUN mkdir -p /app/uploads /home/appuser/.mono && \
|
29 |
+
chmod -R 777 /app/uploads /home/appuser/.mono
|
30 |
|
31 |
+
# Set the MONO_HOME environment variable
|
32 |
+
ENV MONO_HOME="/home/appuser/.mono"
|
33 |
+
# Add the Mono tools directory to PATH
|
34 |
+
ENV PATH="${PATH}:${MONO_HOME}/bin:/usr/bin"
|
35 |
|
36 |
+
# Ensure mcs is in the PATH
|
37 |
+
RUN echo $PATH && which mcs
|
38 |
|
39 |
# Copy the requirements file with the correct owner
|
40 |
COPY --chown=appuser:appuser ./requirements.txt /app/requirements.txt
|