Skip to content

Commit

Permalink
Update Dockerfile for base image, patch aosp-repo
Browse files Browse the repository at this point in the history
Signed-off-by: Harry Chen <[email protected]>
  • Loading branch information
Harry-Chen committed Dec 2, 2023
1 parent 9b8f3c8 commit b9059ae
Showing 1 changed file with 13 additions and 12 deletions.
25 changes: 13 additions & 12 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
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 \
Expand All @@ -18,20 +17,22 @@ RUN if [ "$(uname -m)" != "x86_64" -a "$(uname -m)" != "i386" ]; then \
# RUN pip3 install --upgrade pip
RUN python3 -m pip install gsutil --break-system-packages

RUN echo "en_US.UTF-8 UTF-8" > /etc/locale.gen && apt-get install -y locales -qq && locale-gen
ENV LANG=en_US.UTF-8 LANGUAGE=en_US.UTF-8 LC_ALL=en_US.UTF-8 HOME=/tmp
RUN mkdir -p /home/tunasync-scripts
CMD /bin/bash


# ====================
# customizations

# 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

# download composer-mirror
# 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

RUN mkdir -p /home/tunasync-scripts
ADD https://storage.googleapis.com/git-repo-downloads/repo /usr/local/bin/aosp-repo
RUN chmod 0755 /usr/local/bin/aosp-repo

RUN echo "en_US.UTF-8 UTF-8" > /etc/locale.gen && apt-get install -y locales -qq && locale-gen
ENV LANG=en_US.UTF-8
ENV LANGUAGE=en_US.UTF-8
ENV LC_ALL=en_US.UTF-8

ENV HOME=/tmp
CMD /bin/bash
# download and patch aosp-repo
ADD --chmod=0755 https://storage.googleapis.com/git-repo-downloads/repo /usr/local/bin/aosp-repo
RUN sed -i 's:#!/usr/bin/env python:#!/usr/bin/env python3:' /usr/local/bin/aosp-repo

0 comments on commit b9059ae

Please sign in to comment.