Skip to content

Commit 018ec79

Browse files
committed
WIP
1 parent 4e9df6c commit 018ec79

1 file changed

Lines changed: 6 additions & 35 deletions

File tree

.devcontainer/Dockerfile

Lines changed: 6 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ ARG DISTRO="slim-bookworm"
55
# Base stage for sentry services
66
FROM ${IMAGE}:${VERSION}-${DISTRO} AS base
77

8-
USER root
98
RUN 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

5753
USER sentry
5854

59-
COPY --chown=sentry:sentry . .
60-
6155
FROM base AS rails-mini
6256

57+
USER sentry
58+
6359
COPY entrypoint-rails-mini.sh /workspace/rails-entrypoint.sh
6460

6561
ENTRYPOINT ["/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

9365
USER sentry
9466

95-
# Copy source code
96-
COPY --chown=sentry:sentry . .
67+
COPY entrypoint-svelte-mini.sh /usr/local/bin/svelte-entrypoint.sh
9768

9869
ENTRYPOINT ["/usr/local/bin/svelte-entrypoint.sh"]

0 commit comments

Comments
 (0)