Skip to content

Commit 5208083

Browse files
committed
APP-9140 | Testing chainguard image - fixed dockerfile
1 parent 544ecbf commit 5208083

1 file changed

Lines changed: 14 additions & 12 deletions

File tree

Dockerfile.chainguard

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM cgr.dev/atlan.com/python:3.11
1+
FROM cgr.dev/atlan.com/pyatlan-golden:3.11
22

33
# Build arguments for configurable versions
44
ARG PYTHON_VERSION=3.11
@@ -8,18 +8,17 @@ ARG INSTALL_FROM_GIT=false
88

99
WORKDIR /app
1010

11+
# Set UV environment variables
12+
# REMOVE THIS WHEN https://github.com/astral-sh/uv/issues/8635 IS FIXED
13+
ENV UV_NO_MANAGED_PYTHON=true \
14+
UV_SYSTEM_PYTHON=true
15+
16+
# Switch to root for installation
17+
USER root
18+
1119
# Install pyatlan - either from PyPI or git branch
12-
RUN --mount=type=cache,target=/root/.cache/uv \
13-
if [ "$INSTALL_FROM_GIT" = "true" ]; then \
14-
echo "Installing pyatlan from git branch: $PYATLAN_BRANCH"; \
15-
uv pip install --system "git+https://github.com/atlanhq/atlan-python.git@$PYATLAN_BRANCH"; \
16-
elif [ "$PYATLAN_VERSION" = "latest" ]; then \
17-
echo "Installing latest pyatlan from PyPI"; \
18-
uv pip install --system pyatlan; \
19-
else \
20-
echo "Installing pyatlan==$PYATLAN_VERSION from PyPI"; \
21-
uv pip install --system pyatlan==$PYATLAN_VERSION; \
22-
fi
20+
RUN echo "Installing pyatlan==$PYATLAN_VERSION from PyPI"; \
21+
uv pip install --system pyatlan==$PYATLAN_VERSION;
2322

2423
# Add build information as labels
2524
RUN if [ "$INSTALL_FROM_GIT" = "true" ]; then \
@@ -31,6 +30,9 @@ RUN if [ "$INSTALL_FROM_GIT" = "true" ]; then \
3130
fi && \
3231
echo "LABEL python.version=$PYTHON_VERSION" >> /tmp/labels
3332

33+
# Switch back to nonroot user
34+
USER nonroot
35+
3436
# Default working directory for applications
3537
WORKDIR /app
3638

0 commit comments

Comments
 (0)