我正在尝试从以下 dockerfile 构建一个 docker 镜像:
FROM ubuntu:18.04
# Install Python
RUN apt-get update && apt-get install -y python3.10 python3-pip
# Install Java
RUN apt-get update && apt-get install -y openjdk-8-jdk
# Install Bowtie2
RUN apt-get update && apt-get install -y bowtie2
RUN apt-get update && \
apt-get install --yes --no-install-recommends \
zlib1g-dev \
libbz2-dev \
liblzma-dev \
&& rm -rf /var/lib/apt/lists/*
# Install RSeQC
RUN apt-get update && apt-get install -y python-pip
RUN pip install RSeQC
# Install biopython=1.80
RUN pip install biopython
# Install Atria
RUN apt-get update && apt-get install -y wget
RUN wget https://github.com/cihga39871/Atria/releases/download/v3.1.2/atria-3.1.2-linux.tar.gz
RUN tar -zxf atria-3.1.2-linux.tar.gz
RUN mv atria-3.1.2/bin/atria /usr/local/bin/atria
RUN chmod +x /usr/local/bin/atria
##Atria dependencies
RUN apt-get update && apt-get install pigz pbzip2
# Install findtail
RUN apt-get update && apt-get install -y wget
RUN wget https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/findtail/findtail_v1.01
RUN mv findtail_v1.01 /usr/local/bin/findtail_v1.01
RUN chmod +x /usr/local/bin/findtail_v1.01
当我尝试构建图像时,它卡在了:
Configuring tzdata
------------------
Please select the geographic area in which you live. Subsequent configuration
questions will narrow this down by presenting a list of cities, representing
the time zones in which they are located.
1. Africa 4. Australia 7. Atlantic 10. Pacific 13. Etc
2. America 5. Arctic 8. Europe 11. SystemV
3. Antarctica 6. Asia 9. Indian 12. US
Geographic area: 6
它会永远卡在那里,直到我按 ctrl+c。知道为什么会这样吗?
您需要稍微修改 Dockerfile。一
apt update
开始需要做一次。Tzdata 作为依赖项安装,配置不起作用。使用线路您需要采用时区。
最后你的 dockerfile 可能看起来像:
归功于如何安装-tzdata-on-a-ubuntu-docker-image