Spaces:
Sleeping
Sleeping
Commit
·
a507a7f
1
Parent(s):
2ed0d98
update: docker image magic
Browse files- Dockerfile +3 -6
Dockerfile
CHANGED
@@ -8,14 +8,11 @@ RUN chmod 777 /app
|
|
8 |
# Install dependencies including ffmpeg and imagemagick
|
9 |
RUN apt-get update && apt-get install -y \
|
10 |
ffmpeg \
|
11 |
-
imagemagick \
|
|
|
|
|
12 |
&& rm -rf /var/lib/apt/lists/*
|
13 |
|
14 |
-
# Modify ImageMagick security policy to allow operations in /tmp
|
15 |
-
RUN sed -i 's#<policy domain="coder" rights="none" pattern="PDF" />#<policy domain="coder" rights="read|write" pattern="PDF" />#' /etc/ImageMagick-6/policy.xml
|
16 |
-
RUN sed -i 's#<policy domain="path" rights="none" pattern="/tmp/" />#<policy domain="path" rights="read|write" pattern="/tmp/" />#' /etc/ImageMagick-6/policy.xml
|
17 |
-
|
18 |
-
# Copy requirements.txt and install dependencies
|
19 |
COPY requirements.txt ./
|
20 |
|
21 |
RUN pip install --no-cache-dir -r requirements.txt
|
|
|
8 |
# Install dependencies including ffmpeg and imagemagick
|
9 |
RUN apt-get update && apt-get install -y \
|
10 |
ffmpeg \
|
11 |
+
imagemagick libmagickwand-dev --no-install-recommends \
|
12 |
+
&& pecl install imagick \
|
13 |
+
&& docker-php-ext-enable imagick \
|
14 |
&& rm -rf /var/lib/apt/lists/*
|
15 |
|
|
|
|
|
|
|
|
|
|
|
16 |
COPY requirements.txt ./
|
17 |
|
18 |
RUN pip install --no-cache-dir -r requirements.txt
|