Skip to content

Commit 7d40d40

Browse files
tom93vmcj
authored andcommitted
Switch from 'apt' back to 'apt-get'
The newer 'apt' command is recommended for interactive use, but not for scripts. Running 'apt' non-interactively produces the following message: WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
1 parent 2608426 commit 7d40d40

File tree

8 files changed

+20
-20
lines changed

8 files changed

+20
-20
lines changed

.github/workflows/build-domjudge-container-PR.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ jobs:
5454
if [ ${{ env.DOMJUDGE_VERSION }} != "M.m.p" ]; then
5555
exit 0
5656
fi
57-
sudo apt update; sudo apt install -y jq curl
57+
sudo apt-get update; sudo apt-get install -y jq curl
5858
set -x
5959
HUBURL="https://registry.hub.docker.com/v2/repositories/domjudge/domserver/tags"
6060
TAG=$(curl $HUBURL|jq '.results | sort_by(.name) | .[-2].name')

.github/workflows/build-domjudge-container-release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ jobs:
5454
echo "I don't know which version to pick!"
5555
exit 1
5656
fi
57-
sudo apt update; sudo apt install jq curl -y
57+
sudo apt-get update; sudo apt-get install jq curl -y
5858
set -x
5959
HUBURL="https://registry.hub.docker.com/v2/repositories/domjudge/domserver/tags"
6060
TAG=$(curl $HUBURL|jq '.results | sort_by(.name) | .[-2].name')

docker-contributor/Dockerfile

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@ ENV DEBIAN_FRONTEND=noninteractive \
1616
DJ_DB_INSTALL_BARE=0 \
1717
PHPSUPPORTED="8.1 8.2 8.3" \
1818
DEFAULTPHPVERSION="8.3" \
19-
APTINSTALL="apt install -y -o Dpkg::Options::=--force-confdef -o Dpkg::Options::=--force-confold"
19+
APTINSTALL="apt-get install -y -o Dpkg::Options::=--force-confdef -o Dpkg::Options::=--force-confold"
2020

2121
# Install required packages and clean up afterwards to make this image layer smaller
22-
RUN apt update \
23-
&& apt install --no-install-recommends --no-install-suggests -y \
22+
RUN apt-get update \
23+
&& apt-get install --no-install-recommends --no-install-suggests -y \
2424
dumb-init autoconf automake git acl \
2525
gcc g++ make zip unzip mariadb-client \
2626
nginx php8.3 php8.3-cli php8.3-fpm php8.3-zip \
@@ -53,14 +53,14 @@ RUN groupadd -g $GID domjudge \
5353
&& for id in $(seq 0 4); do useradd -d /nonexistent -g nogroup -s /bin/false "domjudge-run-$id"; done
5454

5555
# Install composer
56-
RUN apt update && \
57-
apt install --no-install-recommends --no-install-suggests -y ca-certificates \
56+
RUN apt-get update && \
57+
apt-get install --no-install-recommends --no-install-suggests -y ca-certificates \
5858
&& rm -rf /var/lib/apt/lists/* \
5959
&& php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" && php composer-setup.php \
6060
&& mv /composer.phar /usr/local/bin/composer
6161

6262
# Install all supported PHP versions
63-
RUN add-apt-repository ppa:ondrej/php -y && apt update
63+
RUN add-apt-repository ppa:ondrej/php -y && apt-get update
6464
RUN for VERSION in $PHPSUPPORTED; do \
6565
if [ "${VERSION}" != "8.3" ]; then \
6666
$APTINSTALL php${VERSION}; \

docker-gitlabci/Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
FROM ubuntu:24.04
22
ENV DEBIAN_FRONTEND=noninteractive
33
ENV PHPSUPPORTED="7.4 8.0 8.1 8.2"
4-
ENV APTINSTALL="apt install -y -o Dpkg::Options::=--force-confdef -o Dpkg::Options::=--force-confold"
5-
RUN apt update && apt install -y \
4+
ENV APTINSTALL="apt-get install -y -o Dpkg::Options::=--force-confdef -o Dpkg::Options::=--force-confold"
5+
RUN apt-get update && apt-get install -y \
66
acl make zip unzip apache2-utils bsdmainutils libcurl4-gnutls-dev \
77
libjsoncpp-dev libmagic-dev autoconf automake bats sudo debootstrap procps \
88
gcc g++ default-jre-headless default-jdk ghc fp-compiler libcgroup-dev \
@@ -29,7 +29,7 @@ RUN apt update && apt install -y \
2929
RUN composer -n require justinrainbow/json-schema
3030

3131
# Install other PHP versions
32-
RUN add-apt-repository ppa:ondrej/php -y && apt update && \
32+
RUN add-apt-repository ppa:ondrej/php -y && apt-get update && \
3333
PACKAGES=$(dpkg-query -f '${binary:Package}\n' -W|grep "^php.*-") && \
3434
for VERSION in $PHPSUPPORTED; do \
3535
$APTINSTALL php${VERSION} && \

docker/domserver/Dockerfile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ LABEL org.opencontainers.image.authors="DOMjudge team <[email protected]>"
44
ENV DEBIAN_FRONTEND=noninteractive
55

66
# Install required packages for build of domserver
7-
RUN apt update \
8-
&& apt install --no-install-recommends --no-install-suggests -y \
7+
RUN apt-get update \
8+
&& apt-get install --no-install-recommends --no-install-suggests -y \
99
autoconf automake git pkg-config \
1010
gcc g++ make acl zip unzip \
1111
php-cli php-zip \
@@ -52,8 +52,8 @@ ENV DEBIAN_FRONTEND=noninteractive \
5252
DJ_DB_INSTALL_BARE=0
5353

5454
# Install required packages for running of domserver
55-
RUN apt update \
56-
&& apt install --no-install-recommends --no-install-suggests -y \
55+
RUN apt-get update \
56+
&& apt-get install --no-install-recommends --no-install-suggests -y \
5757
acl curl zip unzip supervisor mariadb-client apache2-utils \
5858
nginx php-cli php-fpm php-zip \
5959
php-gd php-curl php-mysql php-json php-intl \

docker/judgehost/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ ENV DEBIAN_FRONTEND=noninteractive \
1111
RUN_USER_UID_GID=62860
1212

1313
# Install required packages for running of judgehost
14-
RUN apt update \
15-
&& apt install --no-install-recommends --no-install-suggests -y \
14+
RUN apt-get update \
15+
&& apt-get install --no-install-recommends --no-install-suggests -y \
1616
dumb-init pkg-config \
1717
acl lsof zip unzip supervisor sudo procps libcgroup2 \
1818
php-cli php-zip php-gd php-curl php-mysql php-json \

docker/judgehost/Dockerfile.build

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ LABEL org.opencontainers.image.authors="DOMjudge team <[email protected]>"
44
ENV DEBIAN_FRONTEND=noninteractive
55

66
# Install required packages for build of judgehost
7-
RUN apt update \
8-
&& apt install --no-install-recommends --no-install-suggests -y \
7+
RUN apt-get update \
8+
&& apt-get install --no-install-recommends --no-install-suggests -y \
99
autoconf automake git pkg-config \
1010
gcc g++ make zip unzip \
1111
php-cli php-zip lsb-release debootstrap \

docker/judgehost/Dockerfile.chroot

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
FROM ubuntu:20.04
22
ENV DEBIAN_FRONTEND=noninteractive
3-
RUN apt update && apt -y install \
3+
RUN apt-get update && apt-get -y install \
44
ca-certificates default-jre-headless pypy3 locales \
55
&& rm -rf /var/lib/apt/lists/*
66

0 commit comments

Comments
 (0)