Skip to content

Commit 5fed3b6

Browse files
committed
[CI] Simplifies Dockerfile
We don't need to create snapshots anymore, so removing unnecessary user configuration.
1 parent 325448e commit 5fed3b6

File tree

1 file changed

+2
-21
lines changed

1 file changed

+2
-21
lines changed

.buildkite/Dockerfile

+2-21
Original file line numberDiff line numberDiff line change
@@ -2,35 +2,16 @@ ARG RUBY_VERSION=${RUBY_VERSION:-3.1}
22
ARG RUBY_SOURCE=${RUBY_SOURCE:-ruby}
33
FROM $RUBY_SOURCE:$RUBY_VERSION
44

5-
# Default UID/GID to 1000
6-
# it can be overridden at build time
7-
ARG BUILDER_UID=1000
8-
ARG BUILDER_GID=1000
9-
ENV BUILDER_USER elastic
10-
ENV BUILDER_GROUP elastic
11-
125
ARG QUIET=${QUIET:-true}
136
ARG CI=${CI:-false}
147
ENV QUIET=$QUIET
158
ENV CI=$CI
169
ARG TRANSPORT_VERSION=${TRANSPORT_VERSION:-8}
1710

1811
# Install required tools
19-
RUN apt-get -q update \
20-
&& apt-get -y install zip curl git
21-
22-
# Create user
23-
RUN groupadd --system -g ${BUILDER_GID} ${BUILDER_GROUP} \
24-
&& useradd --system --shell /bin/bash -u ${BUILDER_UID} -g ${BUILDER_GROUP} -d /var/lib/elastic -m elastic 1>/dev/null 2>/dev/null \
25-
&& mkdir -p /usr/src/app && touch /Gemfile.lock \
26-
&& chown -R ${BUILDER_USER}:${BUILDER_GROUP} /usr/src/app /Gemfile.lock
27-
28-
COPY --chown=$BUILDER_USER:$BUILDER_GROUP . .
29-
12+
RUN apt-get -q update && apt-get -y install zip curl git
3013
WORKDIR /usr/src/app
31-
32-
USER ${BUILDER_USER}:${BUILDER_GROUP}
33-
14+
COPY . .
3415
RUN bundle install \
3516
&& bundle exec rake bundle:clean \
3617
&& rake bundle:install

0 commit comments

Comments
 (0)