You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

34 line
736 B

  1. FROM python:3.9-slim
  2. RUN useradd --create-home --shell /bin/bash kosmorro
  3. WORKDIR /home/kosmorro
  4. ENV PATH="/home/kosmorro:${PATH}"
  5. # Prepare environment
  6. RUN python -m pip install --upgrade pip
  7. RUN pip install pipenv
  8. COPY Pipfile.lock .
  9. RUN pipenv sync && pipenv run pip freeze > requirements.txt
  10. # Add files
  11. RUN pip install -r requirements.txt
  12. COPY _kosmorro/ _kosmorro/
  13. COPY kosmorro .
  14. # Compile the translations
  15. COPY setup.py setup.py
  16. COPY setup.cfg setup.cfg
  17. COPY README.md README.md
  18. RUN python setup.py compile_catalog
  19. # Clean the image
  20. RUN rm setup.py setup.cfg README.md && \
  21. rm _kosmorro/locales/messages.pot _kosmorro/locales/*/LC_MESSAGES/messages.po && \
  22. pip uninstall --yes pipenv
  23. USER kosmorro
  24. CMD ["bash"]