Skip to content

Commit ccc3fcc

Browse files
committed
locally installed requirements through dockerfile - no error spinning up sudo docker-compose up --build
1 parent adbe771 commit ccc3fcc

File tree

2 files changed

+68
-0
lines changed

2 files changed

+68
-0
lines changed

.devcontainer/Dockerfile

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,18 @@ FROM mcr.microsoft.com/vscode/devcontainers/base:bullseye
44
# root acess for beginning of the script
55
USER root
66

7+
# Install main dependencies in one step to reduce layers
8+
RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
9+
&& apt-get install -y --no-install-recommends \
10+
libpoppler-cpp-dev \
11+
python-is-python3 \
12+
gdal-bin \
13+
libgdal-dev \
14+
imagemagick \
15+
libmagickwand-dev \
16+
&& apt-get clean \
17+
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
18+
719
# [Option] Install zsh
820
ARG INSTALL_ZSH="true"
921
# [Option] Upgrade OS packages to their latest versions
@@ -35,6 +47,26 @@ RUN apt-get update \
3547
RUN mkdir -p /usr/share/elasticsearch /var/lib/elasticsearch /var/log/elasticsearch \
3648
&& chown -R baseuser:baseuser /usr/share/elasticsearch /var/lib/elasticsearch /var/log/elasticsearch
3749

50+
# Copy the requirements file to the working directory
51+
COPY codespaces-requirements.txt .
52+
53+
# Display the contents of requirements.txt for debugging
54+
RUN echo "Displaying requirements.txt:" && cat codespaces-requirements.txt
55+
56+
# Update package list and install pip for Python 3
57+
RUN apt-get update && \
58+
apt-get install -y python3-pip
59+
60+
# Display Python and pip versions for debugging
61+
RUN python3 --version && pip3 --version
62+
63+
# Upgrade pip
64+
RUN pip3 install --upgrade pip
65+
66+
67+
# Install dependencies globally
68+
RUN pip install -r codespaces-requirements.txt
69+
3870
# Switch back to the baseuser
3971
USER baseuser
4072

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
django==4.2.4
2+
Markdown==3.4.3
3+
celery==5.2.7
4+
django-celery-email==3.0.0
5+
django-taggit==4.0.0
6+
pytz==2023.3
7+
requests==2.31.0
8+
django-floppyforms==1.9.0
9+
python-magic==0.4.27
10+
python-mimeparse==1.6.0
11+
django-configurations==2.5.1
12+
django-storages==1.13.2
13+
dj-database-url==2.0.0
14+
django-contrib-comments==2.2.0
15+
unicodecsv==0.14.1
16+
django-tinymce==3.6.1
17+
python-docx==0.8.11
18+
elasticsearch==8.11.1
19+
20+
-e git+https://github.com/codewithaloha/froide.git@main#egg=froide
21+
22+
lxml==5.2.1
23+
channels==4.0.0
24+
django-treebeard==4.4
25+
django-leaflet==0.29.0
26+
django-json-widget==1.1.1
27+
django-celery-beat==2.5.0
28+
django-mfa3==0.11.0
29+
psycopg[binary]==3.1.18
30+
psycopg-binary==3.1.18
31+
-e git+https://github.com/okfde/django-filingcabinet.git@main#egg=django-filingcabinet
32+
oauthlib==3.2.2
33+
django-oauth-toolkit==1.7.1
34+
django-fsm==2.8.1
35+
websockets==11.0.3
36+
bleach==6.0.0

0 commit comments

Comments
 (0)