Skip to content

Commit 9aa5abe

Browse files
committed
Streamline Dockerfile used by CI
1 parent 7a49a9c commit 9aa5abe

File tree

1 file changed

+5
-15
lines changed

1 file changed

+5
-15
lines changed

.ci/Dockerfile

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,13 @@
1-
ARG PYTHON_VERSION=3.8
1+
ARG PYTHON_VERSION=3.9
22
FROM python:${PYTHON_VERSION}
33

4-
# Default UID/GID to 1000
5-
# it can be overridden at build time
6-
ARG BUILDER_UID=1000
7-
ARG BUILDER_GID=1000
8-
ENV BUILDER_USER elastic
9-
ENV BUILDER_GROUP elastic
10-
114
WORKDIR /code/elasticsearch-serverless-python
5+
RUN mkdir -p /code/elasticsearch-serverless-python/build
126

13-
# Create user
14-
RUN groupadd --system -g ${BUILDER_GID} ${BUILDER_GROUP} \
15-
&& useradd --system --shell /bin/bash -u ${BUILDER_UID} -g ${BUILDER_GROUP} -d /var/lib/elastic -m elastic 1>/dev/null 2>/dev/null \
16-
&& mkdir /code/elasticsearch-serverless-python/build \
17-
&& chown -R ${BUILDER_USER}:${BUILDER_GROUP} /code/
18-
USER ${BUILDER_USER}:${BUILDER_GROUP}
19-
COPY --chown=$BUILDER_USER:$BUILDER_GROUP . .
7+
COPY pyproject.toml README.rst .
208
RUN python -m pip install \
219
-U --no-cache-dir \
2210
--disable-pip-version-check \
2311
.[dev]
12+
13+
COPY . .

0 commit comments

Comments
 (0)