-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add AMD (x86_64) and ARM (aarch64) on Heroku-24
AMD/x86_64 is the architecture used for all prior base images. Heroku-24 (Ubuntu 24.04) base image is provided with support for ARM/aarch64 (think m1 Mac or graviton AWS server) support. This PR does several things: - Introduces support for heroku-24 base image - Build both arm64 and amd64 architecture binaries
- Loading branch information
Showing
10 changed files
with
221 additions
and
15 deletions.
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
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
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,17 @@ | ||
FROM heroku/heroku:24-build | ||
|
||
USER root | ||
|
||
# setup workspace | ||
RUN rm -rf /tmp/workspace | ||
RUN mkdir -p /tmp/workspace | ||
|
||
RUN apt-get update -y; apt-get install ruby -y | ||
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y | ||
ENV PATH="/root/.cargo/bin:${PATH}" | ||
|
||
# output dir is mounted | ||
|
||
ADD build.rb /tmp/build.rb | ||
COPY lib/ /tmp/lib/ | ||
CMD ["ruby", "/tmp/build.rb", "/tmp/workspace", "/tmp/output", "/tmp/cache"] |
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 |
---|---|---|
@@ -1,5 +1,13 @@ | ||
require "build_script" | ||
|
||
module DockerCommand | ||
def self.gem_version_from_tar(ruby_version:, stack:) | ||
"docker run -v $(pwd)/builds/#{stack}:/tmp/output hone/ruby-builder:#{stack} bash -c \"mkdir /tmp/unzipped && tar xzf /tmp/output/#{ruby_version.tar_file_name_output} -C /tmp/unzipped && echo 'Rubygems version is: ' && /tmp/unzipped/bin/gem -v\"" | ||
def self.gem_version_from_tar(ruby_version:, stack:, system_output: `docker run --rm hone/ruby-builder:#{stack} arch`, success: $?.success?) | ||
ruby_tar_file = stack_architecture_tar_file_name( | ||
stack: stack, | ||
output_dir: "/tmp/output", | ||
architecture: get_architecture(system_output: system_output, success: success), | ||
tar_file_name_output: ruby_version.tar_file_name_output | ||
) | ||
"docker run -v $(pwd)/builds:/tmp/output hone/ruby-builder:#{stack} bash -c \"mkdir /tmp/unzipped && tar xzf #{ruby_tar_file} -C /tmp/unzipped && echo 'Rubygems version is: ' && /tmp/unzipped/bin/gem -v\"" | ||
end | ||
end |
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,5 @@ | ||
#!/bin/bash | ||
|
||
source `dirname $0`/../common.sh | ||
|
||
docker run -v $OUTPUT_DIR:/tmp/output -v $CACHE_DIR:/tmp/cache -e VERSION=3.2.3 -e STACK=heroku-24 hone/ruby-builder:heroku-24 |
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