From 4d8d3aa85c0164b550fdedb2394f9df50d155ca2 Mon Sep 17 00:00:00 2001 From: Miao Wang Date: Sun, 13 Sep 2020 04:14:05 +0800 Subject: [PATCH] Add packages for aarch64 build --- Dockerfile | 4 ++++ dockerfiles/bandersnatch/Dockerfile | 2 +- dockerfiles/nix-channels/Dockerfile | 14 ++++++++------ dockerfiles/rubygems/Dockerfile | 2 +- 4 files changed, 14 insertions(+), 8 deletions(-) diff --git a/Dockerfile b/Dockerfile index a47fd1c..30385c9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,6 +3,10 @@ MAINTAINER Justin Wong RUN apt-get update && \ apt-get install -y wget curl rsync lftp git jq python3-dev python3-pip yum-utils createrepo aria2 ack composer php-curl php-zip + +RUN if [ "$(uname -m)" != "x86_64" -a "$(uname -m)" != "i386" ]; then \ + apt-get install -y libxml2-dev libxslt1-dev zlib1g-dev libssl-dev libffi-dev ;\ + fi RUN STATIC_DEPS=true pip3 install pyquery RUN pip3 install requests[socks] pyyaml gsutil awscli bandersnatch==3.6.0 diff --git a/dockerfiles/bandersnatch/Dockerfile b/dockerfiles/bandersnatch/Dockerfile index 00449b7..e87d369 100644 --- a/dockerfiles/bandersnatch/Dockerfile +++ b/dockerfiles/bandersnatch/Dockerfile @@ -3,7 +3,7 @@ FROM python:3.8-alpine RUN apk add --update --no-cache --virtual .build-deps \ g++ \ bash \ - python-dev \ + python3-dev \ libxml2 \ libxml2-dev && \ apk add libxslt-dev diff --git a/dockerfiles/nix-channels/Dockerfile b/dockerfiles/nix-channels/Dockerfile index 7f3d7d4..792aea1 100644 --- a/dockerfiles/nix-channels/Dockerfile +++ b/dockerfiles/nix-channels/Dockerfile @@ -2,17 +2,19 @@ FROM debian:buster MAINTAINER Wang Ruikang RUN apt-get update && \ - apt-get install -y python3-dev python3-pip curl && \ - pip3 install pyquery requests minio && \ + apt-get install -y python3-dev python3-pip 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 # Install Nix. To simplify management we only copy binaries and create # symlinks, and do no further configuration - curl https://mirrors.tuna.tsinghua.edu.cn/nix/nix-2.3.2/nix-2.3.2-x86_64-linux.tar.xz -o /tmp/nix.tar.xz && \ - mkdir /tmp/nix.unpack && \ - tar xpf /tmp/nix.tar.xz -C /tmp/nix.unpack && \ +RUN mkdir -p /tmp/nix.unpack && \ + curl -L https://mirrors.tuna.tsinghua.edu.cn/nix/nix-2.3.2/nix-2.3.2-x86_64-linux.tar.xz | tar -xpJ -C /tmp/nix.unpack && \ mkdir /nix && \ cp -dpr /tmp/nix.unpack/*/store /nix/store && \ ln -s /nix/store/*-nix-*/bin/* /usr/local/bin && \ - rm -rf /tmp/nix.tar.xz /tmp/nix.unpack + rm -rf /tmp/nix.unpack ENV HOME=/tmp CMD /bin/bash diff --git a/dockerfiles/rubygems/Dockerfile b/dockerfiles/rubygems/Dockerfile index 7335211..563faba 100644 --- a/dockerfiles/rubygems/Dockerfile +++ b/dockerfiles/rubygems/Dockerfile @@ -1,4 +1,4 @@ -FROM cybercode/alpine-ruby:2.3 +FROM ruby:2.7-alpine RUN gem install rubygems-mirror ENV BUSYBOX=1 ENV HOME=/tmp