@@ -5,7 +5,6 @@ ARG DISTRO="slim-bookworm"
55# Base stage for sentry services
66FROM ${IMAGE}:${VERSION}-${DISTRO} AS base
77
8- USER root
98RUN apt-get update && apt-get install -y --no-install-recommends \
109 sudo \
1110 gnupg \
@@ -24,11 +23,8 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
2423 libffi-dev \
2524 libgdbm-dev \
2625 sqlite3 \
27- && apt-get clean \
28- && rm -rf /var/lib/apt/lists/*
29-
30- # Install Chromium for Selenium tests (works on both amd64 and arm64)
31- RUN apt-get update && apt-get install -y --no-install-recommends \
26+ nodejs \
27+ npm \
3228 chromium \
3329 chromium-driver \
3430 && apt-get clean \
@@ -56,43 +52,18 @@ ENV LANG=C.UTF-8 \
5652
5753USER sentry
5854
59- COPY --chown=sentry:sentry . .
60-
6155FROM base AS rails-mini
6256
57+ USER sentry
58+
6359COPY entrypoint-rails-mini.sh /workspace/rails-entrypoint.sh
6460
6561ENTRYPOINT ["/workspace/rails-entrypoint.sh" ]
6662
67- # Svelte mini stage
68- FROM ${IMAGE}:${VERSION}-${DISTRO} AS svelte-mini
69-
70- USER root
71- RUN apt-get update && apt-get install -y --no-install-recommends \
72- sudo \
73- git \
74- curl \
75- nodejs \
76- npm \
77- && apt-get clean \
78- && rm -rf /var/lib/apt/lists/*
79-
80- RUN groupadd --gid 1000 sentry \
81- && useradd --uid 1000 --gid sentry --shell /bin/bash --create-home sentry
82-
83- # Copy and set up entrypoint script for svelte mini
84- COPY --chown=root:root entrypoint-svelte-mini.sh /usr/local/bin/svelte-entrypoint.sh
85- RUN chmod +x /usr/local/bin/svelte-entrypoint.sh
86-
87- # Allow sentry user to use sudo without password for chown
88- RUN echo "sentry ALL=(ALL) NOPASSWD: /bin/chown" >> /etc/sudoers
89-
90- WORKDIR /workspace/sentry
91- RUN chown -R sentry:sentry /workspace/sentry
63+ FROM base AS svelte-mini
9264
9365USER sentry
9466
95- # Copy source code
96- COPY --chown=sentry:sentry . .
67+ COPY entrypoint-svelte-mini.sh /usr/local/bin/svelte-entrypoint.sh
9768
9869ENTRYPOINT ["/usr/local/bin/svelte-entrypoint.sh" ]
0 commit comments