-
-
Notifications
You must be signed in to change notification settings - Fork 24
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 #564 from sebadob/rework-builder-image
Rework builder image
- Loading branch information
Showing
6 changed files
with
119 additions
and
29 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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 |
---|---|---|
|
@@ -4,7 +4,7 @@ members = ["src/*"] | |
exclude = ["rauthy-client"] | ||
|
||
[workspace.package] | ||
version = "0.26.0-beta2" | ||
version = "0.26.0-beta3" | ||
edition = "2021" | ||
authors = ["Sebastian Dobe <[email protected]>"] | ||
license = "Apache-2.0" | ||
|
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,69 @@ | ||
ARG IMAGE | ||
|
||
FROM $IMAGE AS openssl | ||
|
||
ENV LD_LIBRARY_PATH="${PATH}:/usr/local/lib64" | ||
ENV PKG_CONFIG_PATH="/usr/local/lib64/pkgconfig" | ||
ENV MAKEFLAGS="-j32" | ||
|
||
WORKDIR /root | ||
|
||
RUN <<EOF | ||
set -e | ||
|
||
apt update | ||
apt install -y build-essential checkinstall curl zlib1g-dev vim | ||
rm -rf /var/lib/apt/lists/* | ||
|
||
curl -LO https://github.com/openssl/openssl/releases/download/openssl-3.3.2/openssl-3.3.2.tar.gz | ||
tar xvf openssl-3.3.2.tar.gz | ||
|
||
cd openssl-3.3.2 | ||
./config | ||
make | ||
make test | ||
make install | ||
echo '/usr/local/lib64' > /etc/ld.so.conf.d/lib64.conf | ||
ldconfig | ||
|
||
cd .. | ||
rm -rf openssl* | ||
EOF | ||
|
||
############################################ | ||
############################################ | ||
|
||
FROM $IMAGE | ||
|
||
ENV PKG_CONFIG_PATH=/usr/local/lib64/pkgconfig | ||
ENV LD_LIBRARY_PATH="${PATH}:/usr/local/lib64" | ||
ENV PKG_CONFIG_PATH="/usr/local/lib64/pkgconfig" | ||
|
||
ENV CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_LINKER=x86_64-linux-gnu-gcc | ||
ENV CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=aarch64-linux-gnu-gcc | ||
|
||
RUN <<EOF | ||
#!/bin/bash | ||
set -e | ||
|
||
rustup target add aarch64-unknown-linux-gnu | ||
|
||
apt update | ||
apt install -y gcc-aarch64-linux-gnu | ||
apt-get clean | ||
EOF | ||
|
||
COPY --from=openssl /etc/ld.so.conf.d/lib64.conf /etc/ld.so.conf.d/lib64.conf | ||
COPY --from=openssl /usr/local/lib64 /usr/local/lib64 | ||
COPY --from=openssl /usr/local/include/openssl /usr/local/include/openssl | ||
COPY --from=openssl /usr/local/bin/openssl /usr/local/bin/openssl | ||
COPY --from=openssl /usr/local/bin/c_rehash /usr/local/bin/c_rehash | ||
COPY --from=openssl /usr/local/ssl /usr/local/ssl | ||
COPY --from=openssl /usr/local/share/man /usr/local/share/man | ||
COPY --from=openssl /usr/local/share/doc/openssl /usr/local/share/doc/openssl | ||
|
||
RUN ldconfig | ||
|
||
WORKDIR /work | ||
|
||
CMD ["/bin/bash"] |
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