@@ -15,17 +15,18 @@ RUN echo "deb http://archive.debian.org/debian/ buster main" > /etc/apt/sources.
1515
1616# TODO install_packages calls apt-get update and then nukes the list files after. We should avoid multiple calls to apt-get update.....
1717# We could probably fix this by running the update and installs ourself with `RUN --mount type=cache` but that is "experimental"
18+ COPY --chmod=755 .docker/install_packages.sh /usr/local/bin/
1819
1920# Fix for Debian Buster EOL - point to archive repositories
2021RUN sed -i 's/deb.debian.org/archive.debian.org/g' /etc/apt/sources.list && \
2122 sed -i 's/security.debian.org/archive.debian.org/g' /etc/apt/sources.list && \
2223 sed -i '/buster-updates/d' /etc/apt/sources.list
2324
24- RUN install_packages apt-transport-https gnupg2 ca-certificates
25+ RUN install_packages.sh apt-transport-https gnupg2 ca-certificates
2526COPY .docker/apt/keys/nodesource.gpg /
2627RUN apt-key add /nodesource.gpg
2728COPY .docker/apt/sources.list.d/nodesource.list /etc/apt/sources.list.d/
28- RUN install_packages \
29+ RUN install_packages.sh \
2930 build-essential python2 \
3031 # needed for compiling native modules on ARM
3132 nodejs ruby \
@@ -43,7 +44,7 @@ ENV LC_ALL en_US.UTF-8
4344
4445
4546FROM base AS ruby_deps
46- RUN install_packages \
47+ RUN install_packages.sh \
4748 bundler \
4849 # Fetches ruby dependencies
4950 ruby-dev make cmake gcc libc-dev patch
@@ -61,7 +62,7 @@ FROM base AS node_deps
6162COPY .docker/apt/keys/yarn.gpg /
6263RUN apt-key add /yarn.gpg
6364COPY .docker/apt/sources.list.d/yarn.list /etc/apt/sources.list.d/
64- RUN install_packages yarn=1.22.19-1
65+ RUN install_packages.sh yarn=1.22.19-1
6566COPY package.json /
6667COPY yarn.lock /
6768ENV YARN_CACHE_FOLDER=/tmp/.yarn-cache
@@ -74,7 +75,7 @@ RUN yarn install --frozen-lockfile --production
7475# Dockerfiles to make the images to serve previews and air gapped docs.
7576FROM base AS build
7677LABEL MAINTAINERS="Nik Everett <nik@elastic.co>"
77- RUN install_packages \
78+ RUN install_packages.sh \
7879 git \
7980 # Clone source repositories and commit to destination repositories
8081 libnss-wrapper \
@@ -110,7 +111,7 @@ RUN rm -rf /var/log/nginx && rm -rf /run/nginx
110111# #### Everything below this run tests
111112FROM base AS py_test
112113# There's not a published wheel for yamale, so we need setuptools and wheel
113- RUN install_packages python3 python3-pip python3-setuptools python3-wheel python3-dev libxml2-dev libxslt-dev zlib1g-dev
114+ RUN install_packages.sh python3 python3-pip python3-setuptools python3-wheel python3-dev libxml2-dev libxslt-dev zlib1g-dev
114115RUN pip3 install \
115116 beautifulsoup4==4.8.1 \
116117 lxml==4.4.2 \
@@ -131,4 +132,4 @@ COPY --from=ruby_test /usr/local/bin/rspec /usr/local/bin/rspec
131132COPY --from=ruby_test /usr/local/bin/rubocop /usr/local/bin/rubocop
132133
133134FROM py_test AS diff_tool
134- RUN install_packages git
135+ RUN install_packages.sh git
0 commit comments