Skip to content

Fix(docker) : Update Dockerfile and docs to use Poetry and NPM#1719

Open
allamiro wants to merge 7 commits intonextcloud:masterfrom
allamiro:fix/issue-1699-docker-build
Open

Fix(docker) : Update Dockerfile and docs to use Poetry and NPM#1719
allamiro wants to merge 7 commits intonextcloud:masterfrom
allamiro:fix/issue-1699-docker-build

Conversation

@allamiro
Copy link

@allamiro allamiro commented Mar 6, 2026

Motivation and Context

The Docker production build currently fails on the master branch because the Dockerfile expects legacy dependency files (requirements/ and yarn.lock) that have been migrated to Poetry and modern NPM. This PR updates the Docker setup to align with the current architecture of the repository.
Closes #1699

What has changed

  • Dockerfile Base Images: Updated Node from 8 to 18 and Python from 3.6 to 3.12 to prevent EOL build failures and align with current project requirements.
  • Frontend Build: Migrated from yarn to npm ci using package-lock.json.
  • Backend Build: Replaced pip install -r requirements.txt with poetry install, directly utilizing pyproject.toml and poetry.lock. Implemented conditional logic to exclude dev dependencies in production builds.
  • .dockerignore: Cleaned up legacy file references and added modern ignore rules (.venv, poetry.toml, etc.) to optimize the build context.
  • Documentation: Updated docs/prodinstalldocker.rst to replace deprecated docker-compose commands with the modern docker compose plugin syntax.

Testing

  • Verified that the Docker image builds successfully locally without looking for missing requirement files.
  • Confirmed the multi-stage build correctly passes the compiled frontend assets and translations to the final image.

allamiro added 3 commits March 6, 2026 16:20
Updated Dockerfile to use Node 18, Python 3.10, NPM, and Poetry,

Signed-off-by: Tamir Suliman <allamir2002@yahoo.com>
Update the contents of .dockerignore 

Signed-off-by: Tamir Suliman <allamir2002@yahoo.com>
Updated documentation file with the modernized commands

Signed-off-by: Tamir Suliman <allamir2002@yahoo.com>
@allamiro allamiro changed the title Fix/issue 1699 Update Dockerfile and docs to use Poetry and NPM Fix(docker) : Update Dockerfile and docs to use Poetry and NPM Mar 6, 2026
@allamiro allamiro marked this pull request as ready for review March 6, 2026 22:38
Updated Python version from 3.10 to 3.12 in both translations and main stages

Signed-off-by: Tamir Suliman <allamir2002@yahoo.com>
Signed-off-by: Tamir Suliman <allamiro@gmail.com>

Updated the Dockerfile to align with the current repository layout:
- migrated from legacy requirements/yarn to Poetry and npm
- updated Python base images to 3.12 to match project requirements
- updated Docker documentation for modern docker compose usage

Local build now progresses against the current branch with the updated dependency model.
@allamiro allamiro force-pushed the fix/issue-1699-docker-build branch from 6c9cd06 to 338fedb Compare March 6, 2026 22:39
@allamiro
Copy link
Author

allamiro commented Mar 8, 2026

Rebased on the latest master. The PR updates the Docker build to match the current repository state (pyproject.toml/poetry.lock and package-lock.json) and removes reliance on legacy requirements/ and yarn.lock.

@edward-ly
Copy link
Collaborator

@allamiro Thanks so much for taking care of this! Before we merge this, do you mind if we ask what you plan to do with the Docker container?

@allamiro
Copy link
Author

allamiro commented Mar 9, 2026

@allamiro Thanks so much for taking care of this! Before we merge this, do you mind if we ask what you plan to do with the Docker container?

Thanks for asking! The plan is to use this container to support a self-hosted, air-gapped Kubernetes environment for our Nextcloud instances. Because we support teams across multiple locations using static, IP-based infrastructure, this image provides the foundation for a portable, isolated deployment. While I am still finalizing the strategy for offline dependency management and internal image and apps mirroring, this PR establishes the core build logic required for our internal hosting workflow. Working on the feature and the documentation. If you have any feedback or additional information that i need to add please let me know
https://github.com/allamiro/appstore/tree/docs/airgapped-install-guide
ca774bf

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Docker build fails on master due to outdated Dockerfile (expects requirements)

2 participants