Skip to content

Commit b0e8f63

Browse files
committed
[DOP-22120] Remove useless system libs from worker image
1 parent 0034667 commit b0e8f63

File tree

5 files changed

+19
-46
lines changed

5 files changed

+19
-46
lines changed

.github/workflows/codeql-analysis.yml

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -38,22 +38,12 @@ jobs:
3838
- name: Install system dependencies
3939
run: |
4040
sudo apt-get update && \
41-
sudo apt-get install -y \
42-
libsasl2-dev \
43-
libsasl2-modules-gssapi-mit \
44-
libsasl2-modules-ldap \
45-
libsasl2-modules \
46-
openjdk-17-jdk \
47-
libssl-dev \
48-
libldap2-dev \
49-
autoconf \
41+
sudo apt-get install -y --no-install-recommends \
42+
openjdk-17-jdk-headless \
5043
gcc \
51-
g++ \
5244
make \
53-
libnghttp2-dev \
5445
libffi-dev \
5546
libkrb5-dev \
56-
krb5-user \
5747
curl
5848
5949
- name: Install poetry

.github/workflows/unit-test.yml

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -31,22 +31,12 @@ jobs:
3131
- name: Install system dependencies
3232
run: |
3333
sudo apt-get update && \
34-
sudo apt-get install -y \
35-
libsasl2-dev \
36-
libsasl2-modules-gssapi-mit \
37-
libsasl2-modules-ldap \
38-
libsasl2-modules \
39-
openjdk-17-jdk \
40-
libssl-dev \
41-
libldap2-dev \
42-
autoconf \
34+
sudo apt-get install -y --no-install-recommends \
35+
openjdk-17-jdk-headless \
4336
gcc \
44-
g++ \
4537
make \
46-
libnghttp2-dev \
4738
libffi-dev \
4839
libkrb5-dev \
49-
krb5-user \
5040
curl
5141
5242
- name: Install poetry ${{ env.POETRY_VERSION }}

docker/Dockerfile.scheduler

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,10 @@ FROM python:3.12-slim AS base
33
RUN apt-get update && apt-get install -y curl \
44
&& rm -rf /var/lib/apt/lists/*
55

6-
RUN curl -sSL https://install.python-poetry.org | python3 - \
7-
&& ln -s /root/.local/bin/poetry /usr/local/bin/poetry \
8-
&& poetry config virtualenvs.create false
6+
RUN pip install --upgrade pip setuptools wheel packaging && \
7+
curl -sSL https://install.python-poetry.org | python3 - && \
8+
ln -s /root/.local/bin/poetry /usr/local/bin/poetry && \
9+
poetry config virtualenvs.create false
910

1011
WORKDIR /app
1112
ENV PYTHONPATH=/app

docker/Dockerfile.server

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,10 @@ FROM $BASE_IMAGE AS base
44
RUN apt-get update && apt-get install -y curl \
55
&& rm -rf /var/lib/apt/lists/*
66

7-
RUN curl -sSL https://install.python-poetry.org | python3 - \
8-
&& ln -s /root/.local/bin/poetry /usr/local/bin/poetry \
9-
&& poetry config virtualenvs.create false
7+
RUN pip install --upgrade pip setuptools wheel packaging && \
8+
curl -sSL https://install.python-poetry.org | python3 - && \
9+
ln -s /root/.local/bin/poetry /usr/local/bin/poetry && \
10+
poetry config virtualenvs.create false
1011

1112
WORKDIR /app
1213
ENV PYTHONPATH=/app

docker/Dockerfile.worker

Lines changed: 7 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,26 @@
11
ARG BASE_IMAGE=python:3.12-slim
22
FROM $BASE_IMAGE AS base
33

4-
RUN apt-get update && apt-get install -y \
5-
libsasl2-dev \
6-
libsasl2-modules-gssapi-mit \
7-
libsasl2-modules-ldap \
8-
libsasl2-modules \
9-
openjdk-17-jdk \
10-
libssl-dev \
11-
libldap2-dev \
12-
autoconf \
4+
ENV DEBIAN_FRONTEND=noninteractive
5+
RUN apt-get update && apt-get install -y --no-install-recommends \
6+
openjdk-17-jdk-headless \
137
gcc \
14-
g++ \
158
make \
16-
libnghttp2-dev \
179
libffi-dev \
1810
libkrb5-dev \
19-
krb5-user \
2011
curl \
2112
&& rm -rf /var/lib/apt/lists/*
2213

23-
RUN curl -sSL https://install.python-poetry.org | python3 - \
24-
&& ln -s /root/.local/bin/poetry /usr/local/bin/poetry \
25-
&& poetry config virtualenvs.create false
14+
RUN pip install --upgrade pip setuptools wheel packaging && \
15+
curl -sSL https://install.python-poetry.org | python3 - && \
16+
ln -s /root/.local/bin/poetry /usr/local/bin/poetry && \
17+
poetry config virtualenvs.create false
2618

2719
WORKDIR /app
2820
ENV PYTHONPATH=/app
2921

3022
COPY ./pyproject.toml ./poetry.lock* /app/
3123

32-
RUN pip install --upgrade pip setuptools wheel packaging
3324
RUN --mount=type=cache,target=/root/.cache/pypoetry \
3425
poetry install \
3526
--no-root \

0 commit comments

Comments
 (0)