Skip to content

Commit

Permalink
Fix cross-compile docker image building (#4006)
Browse files Browse the repository at this point in the history
* Fix xcomp docker image builds
* Remove extra files
  • Loading branch information
csujedihy authored Dec 13, 2023
1 parent 6a972c8 commit df69a24
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 18 deletions.
12 changes: 10 additions & 2 deletions .docker/ubuntu-20.04/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ LABEL org.opencontainers.image.source https://github.com/microsoft/msquic

ENV DEBIAN_FRONTEND=noninteractive

SHELL ["/bin/bash", "-c"]

RUN apt-get update && apt-get install --no-install-recommends -y apt-transport-https \
ca-certificates \
gnupg \
Expand Down Expand Up @@ -53,9 +55,15 @@ RUN wget -q https://packages.microsoft.com/config/ubuntu/18.04/packages-microsof
RUN dpkg --add-architecture arm64
RUN dpkg --add-architecture armhf

RUN cat /etc/apt/sources.list | grep "^deb" | sed 's/deb /deb [arch=amd64] /g' > /etc/apt/sources.list
RUN mv /etc/apt/sources.list /etc/apt/sources.list.int && \
cat /etc/apt/sources.list.int | grep "^deb" | sed 's/deb /deb [arch=amd64] /g' > /etc/apt/sources.list && \
rm /etc/apt/sources.list.int

COPY arm-cross-compile-sources.list /etc/apt/sources.list.d/
RUN echo $' \n\
deb [arch=armhf,arm64] http://ports.ubuntu.com/ focal main restricted universe multiverse \n\
deb [arch=armhf,arm64] http://ports.ubuntu.com/ focal-updates main restricted universe multiverse \n\
deb [arch=armhf,arm64] http://ports.ubuntu.com/ focal-backports main restricted universe multiverse \n\
' > /etc/apt/sources.list.d/arm-cross-compile-sources.list

RUN apt-get update

Expand Down
7 changes: 0 additions & 7 deletions .docker/ubuntu-20.04/arm-cross-compile-sources.list

This file was deleted.

12 changes: 10 additions & 2 deletions .docker/ubuntu-22.04/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ LABEL org.opencontainers.image.source https://github.com/microsoft/msquic

ENV DEBIAN_FRONTEND=noninteractive

SHELL ["/bin/bash", "-c"]

RUN apt-get update && apt-get install --no-install-recommends -y apt-transport-https \
ca-certificates \
gnupg \
Expand Down Expand Up @@ -53,9 +55,15 @@ RUN wget -q https://packages.microsoft.com/config/ubuntu/18.04/packages-microsof
RUN dpkg --add-architecture arm64
RUN dpkg --add-architecture armhf

RUN cat /etc/apt/sources.list | grep "^deb" | sed 's/deb /deb [arch=amd64] /g' > /etc/apt/sources.list
RUN mv /etc/apt/sources.list /etc/apt/sources.list.int && \
cat /etc/apt/sources.list.int | grep "^deb" | sed 's/deb /deb [arch=amd64] /g' > /etc/apt/sources.list && \
rm /etc/apt/sources.list.int

COPY arm-cross-compile-sources.list /etc/apt/sources.list.d/
RUN echo $' \n\
deb [arch=armhf,arm64] http://ports.ubuntu.com/ jammy main restricted universe multiverse \n\
deb [arch=armhf,arm64] http://ports.ubuntu.com/ jammy-updates main restricted universe multiverse \n\
deb [arch=armhf,arm64] http://ports.ubuntu.com/ jammy-backports main restricted universe multiverse \n\
' > /etc/apt/sources.list.d/arm-cross-compile-sources.list

RUN apt-get update

Expand Down
7 changes: 0 additions & 7 deletions .docker/ubuntu-22.04/arm-cross-compile-sources.list

This file was deleted.

0 comments on commit df69a24

Please sign in to comment.