-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 6b05e85
Showing
17 changed files
with
1,219 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
* | ||
!Dockerfile | ||
!bin |
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,10 @@ | ||
# editorconfig.org | ||
root = true | ||
|
||
[*] | ||
indent_style = space | ||
indent_size = 2 | ||
end_of_line = lf | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true |
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,4 @@ | ||
{ | ||
"$schema": "https://docs.renovatebot.com/renovate-schema.json", | ||
"extends": ["local>containerbase/.github"] | ||
} |
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,41 @@ | ||
name: build | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
- 'renovate/**' | ||
|
||
pull_request: | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
flavor: [focal, bionic] | ||
|
||
env: | ||
FLAVOR: ${{ matrix.flavor }} # build target, name required by binary-builder | ||
|
||
steps: | ||
- uses: actions/checkout@v2.3.4 | ||
|
||
- name: docker-config | ||
uses: renovatebot/internal-tools@v1.3.6 | ||
with: | ||
command: docker-config | ||
|
||
- name: binary-builder | ||
uses: renovatebot/internal-tools@v1.3.6 | ||
with: | ||
command: binary-builder | ||
dry-run: ${{github.ref != 'refs/heads/main'}} | ||
build-args: FLAVOR | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- uses: actions/upload-artifact@v2.2.2 | ||
with: | ||
name: ${{ env.FLAVOR }} | ||
path: .cache/*.tar.xz |
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 @@ | ||
.cache | ||
node_modules | ||
dist/ | ||
data/ | ||
.vs/ |
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 @@ | ||
{ | ||
"hooks": { | ||
"pre-commit": "pretty-quick --staged" | ||
} | ||
} |
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,14 @@ | ||
node_modules/ | ||
.vs/ | ||
dist/ | ||
coverage/ | ||
yarn.lock | ||
|
||
.editorconfig | ||
.*ignore | ||
.npmrc | ||
.yarnrc | ||
.yarnclean | ||
|
||
*.snap | ||
*.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"singleQuote": true, | ||
"trailingComma": "es5" | ||
} |
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,23 @@ | ||
#-------------------------------------- | ||
# Ubuntu flavor | ||
#-------------------------------------- | ||
ARG FLAVOR | ||
|
||
#-------------------------------------- | ||
# base images | ||
#-------------------------------------- | ||
FROM ubuntu:bionic@sha256:4bc3ae6596938cb0d9e5ac51a1152ec9dcac2a1c50829c74abd9c4361e321b26 as build-bionic | ||
FROM ubuntu:focal@sha256:b4f9e18267eb98998f6130342baacaeb9553f136142d40959a1b46d6401f0f2b as build-focal | ||
|
||
|
||
#-------------------------------------- | ||
# builder images | ||
#-------------------------------------- | ||
FROM build-${FLAVOR} as builder | ||
|
||
|
||
ENTRYPOINT [ "dumb-init", "--", "builder.sh" ] | ||
|
||
COPY bin /usr/local/bin | ||
|
||
RUN install-builder.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2021 WhiteSource Ltd | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
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,28 @@ | ||
![build](https://github.com/containerbase/ruby/actions/workflows/build.yml/badge.svg) | ||
![GitHub release (latest SemVer)](https://img.shields.io/github/v/release/containerbase/ruby) | ||
![GitHub](https://img.shields.io/github/license/containerbase/ruby) | ||
|
||
# containerbase Ruby releases | ||
|
||
Prebuild Ruby releases used by [containerbase/buildpack](https://github.com/containerbase/buildpack). | ||
|
||
## Local development | ||
|
||
Build the image | ||
|
||
```bash | ||
docker build -t builder --build-arg APT_PROXY=http://apt-proxy:3142 . | ||
``` | ||
|
||
Test the image | ||
|
||
```bash | ||
docker run --rm -it -v ${PWD}/.cache:/cache -e DEBURG=true builder 3.0.0 | ||
``` | ||
|
||
`${PWD}/.cache` will contain packed releases after successful build. | ||
|
||
Optional environment variables | ||
|
||
- `APT_PROXY`: Set an APT http proxy for installing build deps | ||
- `DEBUG`: Show verbose php build output |
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,22 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
VERSION=${1} | ||
|
||
CODENAME=$(. /etc/os-release && echo ${VERSION_CODENAME}) | ||
|
||
NAME=ruby | ||
BUILD_ARGS= | ||
|
||
if [[ "${DEBUG}" == "true" ]]; then | ||
BUILD_ARGS="-v" | ||
fi | ||
|
||
echo "Building ${NAME} ${VERSION} for ${CODENAME}" | ||
ruby-build ${BUILD_ARGS} ${VERSION} /usr/local/${NAME}/${VERSION} | ||
|
||
/usr/local/${NAME}/${VERSION}/bin/ruby -v | ||
|
||
echo "Compressing ${NAME} ${VERSION} for ${CODENAME}" | ||
tar -cJf /cache/${NAME}-${VERSION}-${CODENAME}.tar.xz -C /usr/local/${NAME} ${VERSION} |
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 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
|
||
echo "APT::Install-Recommends \"false\";" | tee -a /etc/apt/apt.conf.d/99buildpack.conf | ||
echo "APT::Get::Upgrade \"false\";" | tee -a /etc/apt/apt.conf.d/99buildpack.conf | ||
echo "APT::Get::Install-Suggests \"false\";" | tee -a /etc/apt/apt.conf.d/99buildpack.conf | ||
|
||
if [[ ! -z "${APT_PROXY+x}" ]]; then | ||
echo "Acquire::http::proxy \"${APT_PROXY}\";" | tee -a /etc/apt/apt.conf.d/99buildpack-proxy.conf | ||
fi | ||
|
||
export DEBIAN_FRONTEND=noninteractive | ||
|
||
apt-get update -q | ||
apt-get install -q -y \ | ||
build-essential \ | ||
ca-certificates \ | ||
curl \ | ||
dumb-init \ | ||
git \ | ||
libssl-dev \ | ||
libreadline-dev \ | ||
zlib1g-dev \ | ||
; | ||
|
||
git clone https://github.com/rbenv/ruby-build.git | ||
PREFIX=/usr/local ./ruby-build/install.sh | ||
|
||
mkdir -p /usr/local/ruby /cache | ||
|
||
if [[ ! -z "${APT_PROXY+x}" ]]; then | ||
rm -f /etc/apt/apt.conf.d/99buildpack-proxy.conf | ||
fi |
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,8 @@ | ||
{ | ||
"image": "ruby", | ||
"depName": "ruby", | ||
"datasource": "ruby-version", | ||
"versioning": "ruby", | ||
"startVersion": "2.5.0", | ||
"ignoredVersions": ["2.5.0-preview1", "2.5.0-rc1", "2.5.2"] | ||
} |
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,20 @@ | ||
{ | ||
"name": "containerbase-ruby", | ||
"version": "1.0.0", | ||
"private": true, | ||
"license": "MIT", | ||
"repository": "https://github.com/containerbase/ruby.git", | ||
"author": "Michael Kriese <michael.kriese@visualon.de>", | ||
"scripts": { | ||
"lint": "run-s prettier", | ||
"prettier": "prettier \"{**/*,*}.*\" --check --ignore-unknown", | ||
"prettier:fix": "prettier \"{**/*,*}.*\" --write --ignore-unknown" | ||
}, | ||
"devDependencies": { | ||
"husky": "4.3.8", | ||
"npm-run-all": "4.1.5", | ||
"prettier": "2.2.1", | ||
"prettier-plugin-package": "1.3.0", | ||
"pretty-quick": "3.1.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#------------------------- | ||
# renovate rebuild trigger | ||
#------------------------- | ||
|
||
# makes lint happy | ||
FROM scratch | ||
|
||
|
||
# renovate: datasource=ruby-version depName=ruby versioning=ruby | ||
ENV RUBY_VERSION=2.7.2 | ||
|
||
|
||
# rebuild trigger | ||
# renovate: datasource=ruby-version depName=ruby versioning=ruby | ||
ENV RUBY_VERSION=3.0.0 |
Oops, something went wrong.