-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #41 from Maegereg/main
Add jammy
- Loading branch information
Showing
3 changed files
with
45 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
FROM ubuntu:jammy | ||
|
||
# Add ubuntu ports repos and make ubuntu default repos architecture specific. | ||
# Ubuntu does the world the great service of hosting different architectures at | ||
# different domains, without specifying that their repos are architecture | ||
# specific in the sources list :/ | ||
RUN mv /etc/apt/sources.list /etc/apt/sources.list.original | ||
COPY ./pkg/crossplatform/cross-compile-sources-list-jammy /etc/apt/sources.list | ||
|
||
# Add required cross-compiler architectures | ||
RUN dpkg --add-architecture arm64 | ||
RUN apt-get update | ||
|
||
# Install dependencies and cross compile toolchain | ||
RUN DEBIAN_FRONTEND=noninteractive apt-get install --yes apt-utils | ||
# The dockerfile currently assumes an amd64 build machine. | ||
RUN DEBIAN_FRONTEND=noninteractive apt-get install --yes make git curl gcc-aarch64-linux-gnu gcc gettext-base libsystemd-dev libsystemd-dev:arm64 | ||
|
||
# Install the rust toolchain | ||
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs > sh.rustup.rs | ||
|
||
RUN sh sh.rustup.rs -y --quiet | ||
ENV PATH="/root/.cargo/bin:${PATH}" | ||
|
||
RUN rustup target add aarch64-unknown-linux-gnu | ||
RUN rustup target add x86_64-unknown-linux-gnu | ||
|
||
COPY ./ /workspace | ||
COPY ./pkg/crossplatform/docker-entrypoint.sh /workspace | ||
|
||
WORKDIR /workspace | ||
|
||
RUN cargo fetch | ||
|
||
ENTRYPOINT ["/usr/bin/env", "bash", "/workspace/docker-entrypoint.sh", "ubuntu22.04", "jammy"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
deb [arch=amd64,i386] http://us.archive.ubuntu.com/ubuntu/ jammy main restricted universe multiverse | ||
deb [arch=amd64,i386] http://us.archive.ubuntu.com/ubuntu/ jammy-updates main restricted universe multiverse | ||
deb [arch=amd64,i386] http://us.archive.ubuntu.com/ubuntu/ jammy-backports main restricted universe multiverse | ||
deb [arch=amd64,i386] http://security.ubuntu.com/ubuntu jammy-security main restricted universe multiverse | ||
|
||
deb [arch=arm64,armhf,ppc64el,s390x] http://ports.ubuntu.com/ubuntu-ports/ jammy main restricted universe multiverse | ||
deb [arch=arm64,armhf,ppc64el,s390x] http://ports.ubuntu.com/ubuntu-ports/ jammy-updates main restricted universe multiverse | ||
deb [arch=arm64,armhf,ppc64el,s390x] http://ports.ubuntu.com/ubuntu-ports/ jammy-backports main restricted universe multiverse | ||
deb [arch=arm64,armhf,ppc64el,s390x] http://ports.ubuntu.com/ubuntu-ports/ jammy-security main restricted universe multiverse |