Skip to content

Commit

Permalink
Try migrating Docker images to bookworm
Browse files Browse the repository at this point in the history
Signed-off-by: Shengqi Chen <[email protected]>
  • Loading branch information
Harry-Chen committed Dec 2, 2023
1 parent f7df7b1 commit 6020ee7
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 22 deletions.
28 changes: 10 additions & 18 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
FROM debian:buster
FROM debian:bookworm
LABEL maintainer="Miao Wang <[email protected]>"

# RUN echo 'deb http://deb.debian.org/debian bullseye-backports main contrib non-free' > /etc/apt/sources.list.d/backports.list
RUN apt-get update && \
apt-get install --no-install-recommends -y \
wget curl rsync lftp git jq python3-dev python3-pip \
yum-utils createrepo debmirror \
wget curl rsync lftp git jq \
python3-dev python3-pip python3-pyquery python3-socks python3-requests python3-yaml awscli \
dnf-plugins-core createrepo-c debmirror \
libnss-unknown xz-utils patch unzip \
aria2 ack openssh-client
# composer php-curl php-zip
Expand All @@ -13,10 +15,11 @@ RUN if [ "$(uname -m)" != "x86_64" -a "$(uname -m)" != "i386" ]; then \
apt-get install --no-install-recommends -y libxml2-dev libxslt1-dev zlib1g-dev libssl-dev libffi-dev ;\
fi

RUN pip3 install --upgrade pip
RUN STATIC_DEPS=true python3 -m pip install pyquery
RUN python3 -m pip install requests[socks] pyyaml gsutil awscli
RUN cd /usr/local/lib/python3.*/dist-packages && echo "/Td6WFoAAATm1rRGAgAhARYAAAB0L+Wj4AHCAPNdADIaSQnC/BF9UN4KT0fVpgATRDuLqRGmPehqSjhNcR3ZqGVBKbVF3r5L2cNs3c+prOthcy3s42Nc79kbE7aRKiQ2r/ivJlWIiio5V2qwWq9aggjTJauhCHLTxXwQiVFDoburbJ4tJYXGnFzOXgYuHjXBWfLKmvshuOMAPYbiPOAgtnQX/8F2sFep7K+0c7/J4HZ6K6ynW121t9pYxX0q6zDZLJBD93rt9Lr/cYC2Eozop6t/ahQsgL1oS1vBXTsA/wQkU0HXOGJ2sJ4J1ULbop82QES9m5CXagcx9EDe7nfJD1UXGgQjif8HCl8y6KFw3rdiPQAAudB1OELBZ/0AAY8CwwMAAAHezTCxxGf7AgAAAAAEWVo=" | base64 -d | xzcat | patch -p1
# RUN pip3 install --upgrade pip
RUN python3 -m pip install gsutil --break-system-packages

# patch awscli
RUN cd /usr/lib/python3/dist-packages && echo "/Td6WFoAAATm1rRGAgAhARYAAAB0L+Wj4AHCAPNdADIaSQnC/BF9UN4KT0fVpgATRDuLqRGmPehqSjhNcR3ZqGVBKbVF3r5L2cNs3c+prOthcy3s42Nc79kbE7aRKiQ2r/ivJlWIiio5V2qwWq9aggjTJauhCHLTxXwQiVFDoburbJ4tJYXGnFzOXgYuHjXBWfLKmvshuOMAPYbiPOAgtnQX/8F2sFep7K+0c7/J4HZ6K6ynW121t9pYxX0q6zDZLJBD93rt9Lr/cYC2Eozop6t/ahQsgL1oS1vBXTsA/wQkU0HXOGJ2sJ4J1ULbop82QES9m5CXagcx9EDe7nfJD1UXGgQjif8HCl8y6KFw3rdiPQAAudB1OELBZ/0AAY8CwwMAAAHezTCxxGf7AgAAAAAEWVo=" | base64 -d | xzcat | patch -p1

# RUN cd /usr/local && git clone --depth 1 https://github.com/tuna/composer-mirror.git && cd composer-mirror && composer i
# COPY composer-mirror.config.php /usr/local/composer-mirror/config.php
Expand All @@ -32,14 +35,3 @@ ENV LC_ALL=en_US.UTF-8

ENV HOME=/tmp
CMD /bin/bash

RUN lftpver="$(dpkg-query --showformat='${Version}' --show lftp)" && \
if dpkg --compare-versions "$lftpver" lt "4.8.4-2+~shankeru1"; then \
if [ "$(uname -m)" = "x86_64" ]; then \
curl -fsSL 'https://salsa.debian.org/shankerwangmiao/lftp/uploads/44e6d15941d3663de8adfbf293edd343/lftp_4.8.4-2+_shankeru1_amd64.deb'; \
elif [ "$(uname -m)" = "aarch64" ]; then \
curl -fsSL 'https://salsa.debian.org/shankerwangmiao/lftp/uploads/ce34a68750902ded261c3b61064b4d6b/lftp_4.8.4-2+_shankeru1_arm64.deb'; \
fi > /tmp/lftp.deb && \
apt-get install -y /tmp/lftp.deb && \
rm -f /tmp/lftp.deb; \
fi
2 changes: 1 addition & 1 deletion dockerfiles/bandersnatch/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG PY_VERSION=3.11
ARG PY_VERSION=3.12

FROM python:${PY_VERSION}-alpine

Expand Down
6 changes: 3 additions & 3 deletions dockerfiles/nix-channels/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
FROM debian:bullseye
FROM debian:bookworm
LABEL maintainer="Wang Ruikang <[email protected]>"

RUN apt-get update && \
apt-get install -y python3-dev python3-pip curl
apt-get install -y python3-dev python3-pip python3-pyquery python3-requests curl
RUN if [ "$(uname -m)" != "x86_64" -a "$(uname -m)" != "i386" ]; then \
apt-get install -y libxml2-dev libxslt1-dev zlib1g-dev ;\
fi
RUN pip3 install pyquery requests minio==5.0.10
RUN pip3 install minio==5.0.10 --break-system-packages
# Install Nix. To simplify management we only copy binaries and create
# symlinks, and do no further configuration
RUN mkdir -p /tmp/nix.unpack && \
Expand Down
File renamed without changes.
File renamed without changes.

0 comments on commit 6020ee7

Please sign in to comment.