-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Add Dockerfile and instructions for building ruby gem locally
- Loading branch information
Showing
5 changed files
with
80 additions
and
17 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 |
---|---|---|
@@ -0,0 +1,30 @@ | ||
FROM ruby:3.3 | ||
|
||
ARG WORKDIR | ||
|
||
RUN apt-get update && apt-get install -y \ | ||
curl \ | ||
build-essential \ | ||
libssl-dev \ | ||
zlib1g-dev \ | ||
&& apt-get clean && rm -rf /var/lib/apt/lists/* | ||
|
||
RUN apt-get install ca-certificates curl | ||
RUN install -m 0755 -d /etc/apt/keyrings | ||
RUN curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc | ||
RUN chmod a+r /etc/apt/keyrings/docker.asc | ||
|
||
RUN echo \ | ||
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/debian \ | ||
$(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \ | ||
tee /etc/apt/sources.list.d/docker.list > /dev/null | ||
RUN apt-get update | ||
RUN apt-get install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin | ||
|
||
WORKDIR $WORKDIR | ||
|
||
RUN gem install rb_sys | ||
|
||
COPY build.sh ./ | ||
|
||
CMD ["/bin/bash", "./build.sh"] |
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,11 @@ | ||
set -e | ||
export RUST_INSTALL_PATH=./rust | ||
mkdir -p $RUST_INSTALL_PATH | ||
export RUSTUP_HOME=$RUST_INSTALL_PATH/rustup | ||
export CARGO_HOME=$RUST_INSTALL_PATH/cargo | ||
export PATH=$CARGO_HOME/bin:$PATH | ||
export RB_SYS_DOCK_CACHE_DIR=./cache | ||
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y | ||
rustup install stable | ||
rustup default stable | ||
rb-sys-dock --platform aarch64-linux-musl --mount-toolchains --ruby-versions 3.3 -V --build -V |
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