Skip to content

Commit

Permalink
locally installed requirements through dockerfile - no error spinning…
Browse files Browse the repository at this point in the history
… up sudo docker-compose up --build
  • Loading branch information
kobebuckley committed Jul 3, 2024
1 parent adbe771 commit ccc3fcc
Show file tree
Hide file tree
Showing 2 changed files with 68 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,18 @@ FROM mcr.microsoft.com/vscode/devcontainers/base:bullseye
# root acess for beginning of the script
USER root

# Install main dependencies in one step to reduce layers
RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
&& apt-get install -y --no-install-recommends \
libpoppler-cpp-dev \
python-is-python3 \
gdal-bin \
libgdal-dev \
imagemagick \
libmagickwand-dev \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

# [Option] Install zsh
ARG INSTALL_ZSH="true"
# [Option] Upgrade OS packages to their latest versions
Expand Down Expand Up @@ -35,6 +47,26 @@ RUN apt-get update \
RUN mkdir -p /usr/share/elasticsearch /var/lib/elasticsearch /var/log/elasticsearch \
&& chown -R baseuser:baseuser /usr/share/elasticsearch /var/lib/elasticsearch /var/log/elasticsearch

# Copy the requirements file to the working directory
COPY codespaces-requirements.txt .

# Display the contents of requirements.txt for debugging
RUN echo "Displaying requirements.txt:" && cat codespaces-requirements.txt

# Update package list and install pip for Python 3
RUN apt-get update && \
apt-get install -y python3-pip

# Display Python and pip versions for debugging
RUN python3 --version && pip3 --version

# Upgrade pip
RUN pip3 install --upgrade pip


# Install dependencies globally
RUN pip install -r codespaces-requirements.txt

# Switch back to the baseuser
USER baseuser

Expand Down
36 changes: 36 additions & 0 deletions .devcontainer/codespaces-requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
django==4.2.4
Markdown==3.4.3
celery==5.2.7
django-celery-email==3.0.0
django-taggit==4.0.0
pytz==2023.3
requests==2.31.0
django-floppyforms==1.9.0
python-magic==0.4.27
python-mimeparse==1.6.0
django-configurations==2.5.1
django-storages==1.13.2
dj-database-url==2.0.0
django-contrib-comments==2.2.0
unicodecsv==0.14.1
django-tinymce==3.6.1
python-docx==0.8.11
elasticsearch==8.11.1

-e git+https://github.com/codewithaloha/froide.git@main#egg=froide

lxml==5.2.1
channels==4.0.0
django-treebeard==4.4
django-leaflet==0.29.0
django-json-widget==1.1.1
django-celery-beat==2.5.0
django-mfa3==0.11.0
psycopg[binary]==3.1.18
psycopg-binary==3.1.18
-e git+https://github.com/okfde/django-filingcabinet.git@main#egg=django-filingcabinet
oauthlib==3.2.2
django-oauth-toolkit==1.7.1
django-fsm==2.8.1
websockets==11.0.3
bleach==6.0.0

0 comments on commit ccc3fcc

Please sign in to comment.