Skip to content

Commit 7987570

Browse files
committed
🩹 fix-simple: fix install and install-dev targets in Makefile and minor change in Dockerfile
For the Dockerfile, create the system account in the production image without a login shell and a home directory.
1 parent b4ae8c7 commit 7987570

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

‎template/Makefile.jinja‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22
install: ## Install the virtual environment and install the pre-commit hooks
33
@command -v uv >/dev/null 2>&1 || { echo "âš¡ uv not found, installing..."; curl -LsSf https://astral.sh/uv/install.sh | sh; }
44
@echo "🚀 Creating virtual environment using uv"
5-
@uv sync
5+
@uv sync --no-dev
66

77
.PHONY: install-dev
88
install-dev: ## Install the virtual environment with the dev dependencies and install the pre-commit hooks
99
@command -v uv >/dev/null 2>&1 || { echo "âš¡ uv not found, installing..."; curl -LsSf https://astral.sh/uv/install.sh | sh; }
1010
@echo "🚀 Creating virtual environment using uv"
11-
@uv sync
11+
@uv sync --all-extras
1212
@uv run pre-commit install -f
1313

1414
.PHONY: check

‎template/{% if dockerfile %}Dockerfile{% endif %}.jinja‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ RUN --mount=type=cache,target=/root/.cache/uv \
3838
FROM python:{{ python_version }}-slim-bookworm AS prod
3939

4040
{% if not privileged_container -%}
41-
RUN groupadd -r {{ project_name }} && useradd -r -g {{ project_name }} {{ project_name }}
41+
RUN groupadd -r {{ project_name }} && useradd -r -g {{ project_name }} -M -s /usr/sbin/nologin {{ project_name }}
4242

4343
RUN mkdir -p /workspaces/{{ project_name }} && chown -R {{ project_name }}:{{ project_name }} /workspaces
4444
{%- endif %}

0 commit comments

Comments
 (0)