diff --git a/.dockerignore b/.dockerignore index 3c21f7a592..b176c5ab41 100644 --- a/.dockerignore +++ b/.dockerignore @@ -7,31 +7,31 @@ src/ui-build/ # Frontend **/node_modules -.next +**/.next # Ignore Python-Specific Files -.mypy_cache/ -.nox/ -.pytest_cache/ -__pycache__/ -.coverage -**.*.pyc -**.*.pyo -**.*.pyd +**/.mypy_cache/ +**/.nox/ +**/.pytest_cache/ +**/__pycache__/ +**/.coverage +**/*.pyc +**/*.pyo +**/*.pyd # pyenv .python-version # Environments -.env -.venv -env/ -venv/ +**/.env +**/.venv +**/env/ +**/venv/ # Editors -.vscode/ -.idea/ +**/.vscode/ +**/.idea/ # the docs directory is needed when building the docs container so it can't be in the # .dockerignore @@ -44,7 +44,7 @@ venv/ # Ignore cypress artifacts **/videos/ **/screenshots/ -.DS_Store +**/.DS_Store # Dev files .pre-commit-config.yaml diff --git a/CHANGELOG.md b/CHANGELOG.md index e2e35465a5..b2512146d0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -42,6 +42,10 @@ The types of changes are: * Add a check to the catchall path to prevent returning paths outside of the UI directory [#2330](https://github.com/ethyca/fides/pull/2330) +### Developer Experience + +* Reduce size of local Docker images by fixing `.dockerignore` patterns [#2360](https://github.com/ethyca/fides/pull/2360) + ## [2.5.0](https://github.com/ethyca/fides/compare/2.4.0...2.5.0) ### Docs diff --git a/Dockerfile b/Dockerfile index 3aeade3b53..65d60e2b65 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,18 +2,6 @@ ARG PYTHON_VERSION="3.10.7" -################### -## Frontend Base ## -################### -FROM node:16 as frontend - -# Build the admin-ui frontend -WORKDIR /fides/clients/admin-ui -COPY clients/admin-ui/package.json clients/admin-ui/package-lock.json ./ -RUN npm install -COPY clients/admin-ui/ . -RUN npm run export - ######################### ## Compile Python Deps ## ######################### @@ -99,6 +87,18 @@ FROM backend as dev RUN pip install -e . --no-deps +################### +## Frontend Base ## +################### +FROM node:16-slim as frontend + +# Build the admin-ui frontend +WORKDIR /fides/clients/admin-ui +COPY clients/admin-ui/package.json clients/admin-ui/package-lock.json ./ +RUN npm install +COPY clients/admin-ui/ . +RUN npm run export + ############################# ## Production Application ## #############################