Skip to content

Commit

Permalink
change https to http in dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
wumingzhilian committed May 16, 2024
1 parent b29b386 commit 0c58cc4
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ FROM ubuntu:22.04
ENV DEBIAN_FRONTEND noninteractive
ENV LC_CTYPE=C.UTF-8

RUN sed -i.bak 's|https\?://archive.ubuntu.com|https://mirrors.hust.edu.cn|g' /etc/apt/sources.list
RUN sed -i.bak 's|https\?://archive.ubuntu.com|http://mirrors.hust.edu.cn|g' /etc/apt/sources.list
RUN apt-get update && \
apt-get install -y \
build-essential \
Expand Down
12 changes: 6 additions & 6 deletions challenge/Dockerfile_amd64
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ RUN <<EOF
apt-get clean && rm -rf /var/lib/apt/lists/*
EOF

RUN sed -i.bak 's|https\?://archive.ubuntu.com|https://mirrors.hust.edu.cn|g' /etc/apt/sources.list
RUN sed -i.bak 's|https\?://archive.ubuntu.com|http://mirrors.hust.edu.cn|g' /etc/apt/sources.list
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
--mount=type=cache,target=/var/lib/apt,sharing=locked \
apt-get update && xargs apt-get install --no-install-recommends -yqq <<EOF && \
Expand All @@ -63,7 +63,7 @@ RUN rm -f /usr/lib/python3.*/EXTERNALLY-MANAGED

FROM essentials as builder-essentials

RUN sed -i.bak 's|https\?://archive.ubuntu.com|https://mirrors.hust.edu.cn|g' /etc/apt/sources.list
RUN sed -i.bak 's|https\?://archive.ubuntu.com|http://mirrors.hust.edu.cn|g' /etc/apt/sources.list
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
--mount=type=cache,target=/var/lib/apt,sharing=locked \
apt-get update && xargs apt-get install --no-install-recommends -yqq <<EOF && \
Expand All @@ -75,7 +75,7 @@ EOF

FROM builder-essentials as builder

RUN sed -i.bak 's|https\?://archive.ubuntu.com|https://mirrors.hust.edu.cn|g' /etc/apt/sources.list
RUN sed -i.bak 's|https\?://archive.ubuntu.com|http://mirrors.hust.edu.cn|g' /etc/apt/sources.list
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
--mount=type=cache,target=/var/lib/apt,sharing=locked \
apt-get update && xargs apt-get install --no-install-recommends -yqq <<EOF && \
Expand Down Expand Up @@ -356,7 +356,7 @@ FROM essentials as builder-desktop-base-no
FROM essentials as builder-desktop-base-yes

ARG UBUNTU_VERSION=20.04
RUN sed -i.bak 's|https\?://archive.ubuntu.com|https://mirrors.hust.edu.cn|g' /etc/apt/sources.list
RUN sed -i.bak 's|https\?://archive.ubuntu.com|http://mirrors.hust.edu.cn|g' /etc/apt/sources.list
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
--mount=type=cache,target=/var/lib/apt,sharing=locked \
[ "${UBUNTU_VERSION}" == "20.04" ] && TGR=common || TGR=tools; \
Expand All @@ -378,7 +378,7 @@ FROM builder-desktop-base-${INSTALL_DESKTOP_BASE} as builder-desktop-base
FROM builder-desktop-base-no as builder-desktop-xfce-no
FROM builder-desktop-base-yes as builder-desktop-xfce-yes

RUN sed -i.bak 's|https\?://archive.ubuntu.com|https://mirrors.hust.edu.cn|g' /etc/apt/sources.list
RUN sed -i.bak 's|https\?://archive.ubuntu.com|http://mirrors.hust.edu.cn|g' /etc/apt/sources.list
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
--mount=type=cache,target=/var/lib/apt,sharing=locked \
apt-get update && xargs apt-get install -yqq <<EOF && \
Expand Down Expand Up @@ -465,7 +465,7 @@ FROM builder-desktop-binja-free-${INSTALL_BINJA_FREE} as builder-desktop-binja-f
FROM essentials as builder-tools-apt-no
FROM essentials as builder-tools-apt-yes

RUN sed -i.bak 's|https\?://archive.ubuntu.com|https://mirrors.hust.edu.cn|g' /etc/apt/sources.list
RUN sed -i.bak 's|https\?://archive.ubuntu.com|http://mirrors.hust.edu.cn|g' /etc/apt/sources.list
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
--mount=type=cache,target=/var/lib/apt,sharing=locked \
apt-get update && xargs apt-get install --no-install-recommends -yqq <<EOF && \
Expand Down
12 changes: 6 additions & 6 deletions challenge/Dockerfile_arm64
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ RUN <<EOF
apt-get clean && rm -rf /var/lib/apt/lists/*
EOF

RUN sed -i.bak 's|https\?://archive.ubuntu.com|https://mirrors.hust.edu.cn|g' /etc/apt/sources.list
RUN sed -i.bak 's|https\?://archive.ubuntu.com|http://mirrors.hust.edu.cn|g' /etc/apt/sources.list
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
--mount=type=cache,target=/var/lib/apt,sharing=locked \
apt-get update && xargs apt-get install --no-install-recommends -yqq <<EOF && \
Expand All @@ -61,7 +61,7 @@ RUN rm -f /usr/lib/python3.*/EXTERNALLY-MANAGED

FROM essentials as builder-essentials

RUN sed -i.bak 's|https\?://archive.ubuntu.com|https://mirrors.hust.edu.cn|g' /etc/apt/sources.list
RUN sed -i.bak 's|https\?://archive.ubuntu.com|http://mirrors.hust.edu.cn|g' /etc/apt/sources.list
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
--mount=type=cache,target=/var/lib/apt,sharing=locked \
apt-get update && xargs apt-get install --no-install-recommends -yqq <<EOF && \
Expand All @@ -73,7 +73,7 @@ EOF

FROM builder-essentials as builder

RUN sed -i.bak 's|https\?://archive.ubuntu.com|https://mirrors.hust.edu.cn|g' /etc/apt/sources.list
RUN sed -i.bak 's|https\?://archive.ubuntu.com|http://mirrors.hust.edu.cn|g' /etc/apt/sources.list
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
--mount=type=cache,target=/var/lib/apt,sharing=locked \
apt-get update && xargs apt-get install --no-install-recommends -yqq <<EOF && \
Expand Down Expand Up @@ -342,7 +342,7 @@ FROM essentials as builder-desktop-base-no
FROM essentials as builder-desktop-base-yes

ARG UBUNTU_VERSION=20.04
RUN sed -i.bak 's|https\?://archive.ubuntu.com|https://mirrors.hust.edu.cn|g' /etc/apt/sources.list
RUN sed -i.bak 's|https\?://archive.ubuntu.com|http://mirrors.hust.edu.cn|g' /etc/apt/sources.list
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
--mount=type=cache,target=/var/lib/apt,sharing=locked \
[ "${UBUNTU_VERSION}" == "20.04" ] && TGR=common || TGR=tools; \
Expand All @@ -364,7 +364,7 @@ FROM builder-desktop-base-${INSTALL_DESKTOP_BASE} as builder-desktop-base
FROM builder-desktop-base-no as builder-desktop-xfce-no
FROM builder-desktop-base-yes as builder-desktop-xfce-yes

RUN sed -i.bak 's|https\?://archive.ubuntu.com|https://mirrors.hust.edu.cn|g' /etc/apt/sources.list
RUN sed -i.bak 's|https\?://archive.ubuntu.com|http://mirrors.hust.edu.cn|g' /etc/apt/sources.list
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
--mount=type=cache,target=/var/lib/apt,sharing=locked \
apt-get update && xargs apt-get install -yqq <<EOF && \
Expand Down Expand Up @@ -412,7 +412,7 @@ FROM builder-desktop-ghidra-${INSTALL_GHIDRA} as builder-desktop-ghidra
FROM essentials as builder-tools-apt-no
FROM essentials as builder-tools-apt-yes

RUN sed -i.bak 's|https\?://archive.ubuntu.com|https://mirrors.hust.edu.cn|g' /etc/apt/sources.list
RUN sed -i.bak 's|https\?://archive.ubuntu.com|http://mirrors.hust.edu.cn|g' /etc/apt/sources.list
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
--mount=type=cache,target=/var/lib/apt,sharing=locked \
apt-get update && xargs apt-get install --no-install-recommends -yqq <<EOF && \
Expand Down
4 changes: 2 additions & 2 deletions ctfd/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FROM python:3.9-slim-buster as build
WORKDIR /opt/CTFd

RUN sed -i.bak 's|https\?://archive.ubuntu.com|https://mirrors.hust.edu.cn|g' /etc/apt/sources.list
RUN sed -i.bak 's|https\?://archive.ubuntu.com|http://mirrors.hust.edu.cn|g' /etc/apt/sources.list
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
build-essential \
Expand All @@ -25,7 +25,7 @@ COPY . /opt/CTFd
FROM python:3.9-slim-buster as release
WORKDIR /opt/CTFd

RUN sed -i.bak 's|https\?://archive.ubuntu.com|https://mirrors.hust.edu.cn|g' /etc/apt/sources.list
RUN sed -i.bak 's|https\?://archive.ubuntu.com|http://mirrors.hust.edu.cn|g' /etc/apt/sources.list
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
libffi6 \
Expand Down
2 changes: 1 addition & 1 deletion windows/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM ubuntu:20.04 AS full

RUN sed -i.bak 's|https\?://archive.ubuntu.com|https://mirrors.hust.edu.cn|g' /etc/apt/sources.list
RUN sed -i.bak 's|https\?://archive.ubuntu.com|http://mirrors.hust.edu.cn|g' /etc/apt/sources.list
RUN echo 'APT::Install-Recommends 0;' >> /etc/apt/apt.conf.d/01norecommends \
&& echo 'APT::Install-Suggests 0;' >> /etc/apt/apt.conf.d/01norecommends \
&& apt-get update \
Expand Down

0 comments on commit 0c58cc4

Please sign in to comment.