Skip to content

Commit 7854558

Browse files
authored
Merge pull request #202 from cloudblue/LITE-31456-bump-deps
LITE-31456: Bump dependencies, refactor Dockerfile
2 parents 2e02ad1 + b7f1fc5 commit 7854558

File tree

3 files changed

+283
-272
lines changed

3 files changed

+283
-272
lines changed

Dockerfile

Lines changed: 19 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
FROM python:3.10-slim
22

3-
ENV NODE_VERSION 20.9.0
3+
ENV NODE_VERSION=20.19.2
44

55
RUN ARCH= && dpkgArch="$(dpkg --print-architecture)" \
66
&& case "${dpkgArch##*-}" in \
@@ -14,8 +14,10 @@ RUN ARCH= && dpkgArch="$(dpkg --print-architecture)" \
1414
esac \
1515
&& set -ex \
1616
# libatomic1 for arm
17-
&& apt-get update && apt-get install -y ca-certificates curl wget gnupg dirmngr xz-utils libatomic1 --no-install-recommends \
18-
&& rm -rf /var/lib/apt/lists/* \
17+
&& DEBIAN_FRONTEND=noninteractive \
18+
&& apt-get update \
19+
&& apt-get upgrade -y \
20+
&& apt-get install -y --no-install-recommends ca-certificates curl wget gnupg dirmngr xz-utils libatomic1 \
1921
&& for key in \
2022
4ED778F539E3634C779C87C6D7062848A1AB005C \
2123
141F07595B7B3FFE74309A937405533BE57C7D57 \
@@ -45,62 +47,40 @@ RUN ARCH= && dpkgArch="$(dpkg --print-architecture)" \
4547
| cut -d: -f1 \
4648
| sort -u \
4749
| xargs -r apt-mark manual \
48-
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \
4950
&& ln -s /usr/local/bin/node /usr/local/bin/nodejs \
5051
# smoke tests
5152
&& node --version \
52-
&& npm --version
53-
54-
55-
RUN apt-get update; \
56-
apt-get install -y git curl tmux ca-certificates libsqlite3-dev gcc;
57-
53+
&& npm --version \
54+
# runner packages
55+
&& apt-get install -y --no-install-recommends git curl tmux ca-certificates libsqlite3-dev gcc \
56+
&& pip install -U pip && pip install poetry && poetry config virtualenvs.create false
5857

5958
ARG RUNNER_VERSION
6059

61-
RUN pip install -U pip && pip install poetry && mkdir -p /root/.config/pypoetry \
62-
&& echo "[virtualenvs]" > /root/.config/pypoetry/config.toml \
63-
&& echo "create = false" >> /root/.config/pypoetry/config.toml
64-
6560
COPY ./connect /install_temp/connect
66-
COPY ./pyproject.toml /install_temp/.
67-
COPY ./README.md /install_temp/.
61+
COPY ./pyproject.toml ./README.md /install_temp/
6862

6963
WORKDIR /install_temp
7064

71-
RUN poetry version ${RUNNER_VERSION}
72-
73-
RUN poetry build
74-
75-
RUN pip install dist/*.whl
76-
77-
RUN apt-get purge gcc -y; \
78-
apt-get autoremove --purge -y; \
65+
RUN poetry version ${RUNNER_VERSION} && \
66+
poetry build && \
67+
pip install dist/*.whl; \
68+
apt-get purge gcc -y; \
69+
apt-get autoremove --purge -y -o APT::AutoRemove::RecommendsImportant=false; \
7970
apt-get clean -y; \
8071
rm -rf /var/lib/apt/lists/*
8172

82-
COPY ./connect/eaas/runner/artworks/ansi_regular.flf /install_temp/.
83-
COPY ./connect/eaas/runner/artworks/bloody.flf /install_temp/.
84-
85-
RUN pyfiglet -L ansi_regular.flf && pyfiglet -L bloody.flf
86-
87-
RUN rm -rf /install_temp
88-
89-
COPY ./extension-devel /usr/local/bin/extension-devel
90-
RUN chmod 755 /usr/local/bin/extension-devel
73+
COPY ./connect/eaas/runner/artworks/ansi_regular.flf ./connect/eaas/runner/artworks/bloody.flf /install_temp/
9174

92-
COPY ./extension-test /usr/local/bin/extension-test
93-
RUN chmod 755 /usr/local/bin/extension-test
75+
RUN pyfiglet -L ansi_regular.flf && pyfiglet -L bloody.flf && rm -rf /install_temp
9476

95-
COPY ./extension-check-static /usr/local/bin/extension-check-static
96-
RUN chmod 755 /usr/local/bin/extension-test
77+
COPY --chmod=755 ./extension-devel ./extension-test ./extension-check-static /usr/local/bin/
9778

9879
RUN mkdir /banners
9980

10081
COPY ./banner* /banners/
10182

102-
COPY ./entrypoint.sh /entrypoint.sh
103-
RUN chmod 755 /entrypoint.sh
83+
COPY --chmod=755 ./entrypoint.sh /entrypoint.sh
10484

10585
WORKDIR /extension
10686

0 commit comments

Comments
 (0)