Skip to content

Add initial jq-based templating engine #349

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 8, 2021

Conversation

tianon
Copy link
Member

@tianon tianon commented Jul 2, 2021

See also docker-library/php#1052 (and linked PRs).

Fixes #341
Closes #342
Closes #348

Hopefully this can help make #348 more straightforward/maintainable 🙏 😅 🎉

@tianon tianon force-pushed the jq-template branch 2 times, most recently from 0d26c6f to 60b294c Compare July 2, 2021 23:43
@tianon
Copy link
Member Author

tianon commented Jul 2, 2021

I cherry-picked/adapted #348 into 60b294c and I think this is much more maintainable (with the same end result). 😅

Once the next release of 2.7 drops, we can just drop that section, and we can axe the whole thing if 2.6 receives the same treatment eventually. 😄

Comment on lines -94 to -102
# https://github.com/docker-library/ruby/issues/246
if [ "$rcVersion" = '2.5' ]; then
rubygems='3.0.3'
sed -ri \
-e 's!%%RUBYGEMS%%!'"$rubygems"'!g' \
"$dir/Dockerfile"
else
sed -ri -e '/RUBYGEMS_VERSION/d' "$dir/Dockerfile"
fi
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👀 🚀 🌞

@tianon
Copy link
Member Author

tianon commented Jul 2, 2021

Here's the money shot: (stripping off the second commit so the diff is more obvious)

Diff:
$ diff -u <(bashbrew cat ruby) <(bashbrew cat <(./generate-stackbrew-library.sh))
--- /dev/fd/63	2021-07-02 16:51:20.941894259 -0700
+++ /dev/fd/62	2021-07-02 16:51:20.941894259 -0700
@@ -3,70 +3,70 @@
 
 Tags: 3.0.1-buster, 3.0-buster, 3-buster, buster, 3.0.1, 3.0, 3, latest
 Architectures: amd64, arm32v5, arm32v7, arm64v8, i386, mips64le, ppc64le, s390x
-GitCommit: 3904524e5d9e538b33525a602a4bcb7618aff8b6
+GitCommit: e1bd3d07b1b92355bf5358e83732c649c1f93c9f
 Directory: 3.0/buster
 
 Tags: 3.0.1-slim-buster, 3.0-slim-buster, 3-slim-buster, slim-buster, 3.0.1-slim, 3.0-slim, 3-slim, slim
 Architectures: amd64, arm32v5, arm32v7, arm64v8, i386, mips64le, ppc64le, s390x
-GitCommit: 3904524e5d9e538b33525a602a4bcb7618aff8b6
-Directory: 3.0/buster/slim
+GitCommit: e1bd3d07b1b92355bf5358e83732c649c1f93c9f
+Directory: 3.0/slim-buster
 
 Tags: 3.0.1-alpine3.13, 3.0-alpine3.13, 3-alpine3.13, alpine3.13, 3.0.1-alpine, 3.0-alpine, 3-alpine, alpine
 Architectures: amd64, arm32v6, arm32v7, arm64v8, i386, ppc64le, s390x
-GitCommit: 3904524e5d9e538b33525a602a4bcb7618aff8b6
+GitCommit: e1bd3d07b1b92355bf5358e83732c649c1f93c9f
 Directory: 3.0/alpine3.13
 
 Tags: 3.0.1-alpine3.12, 3.0-alpine3.12, 3-alpine3.12, alpine3.12
 Architectures: amd64, arm32v6, arm32v7, arm64v8, i386, ppc64le, s390x
-GitCommit: 3904524e5d9e538b33525a602a4bcb7618aff8b6
+GitCommit: e1bd3d07b1b92355bf5358e83732c649c1f93c9f
 Directory: 3.0/alpine3.12
 
 Tags: 2.7.3-buster, 2.7-buster, 2-buster, 2.7.3, 2.7, 2
 Architectures: amd64, arm32v5, arm32v7, arm64v8, i386, mips64le, ppc64le, s390x
-GitCommit: 3904524e5d9e538b33525a602a4bcb7618aff8b6
+GitCommit: e1bd3d07b1b92355bf5358e83732c649c1f93c9f
 Directory: 2.7/buster
 
 Tags: 2.7.3-slim-buster, 2.7-slim-buster, 2-slim-buster, 2.7.3-slim, 2.7-slim, 2-slim
 Architectures: amd64, arm32v5, arm32v7, arm64v8, i386, mips64le, ppc64le, s390x
-GitCommit: 3904524e5d9e538b33525a602a4bcb7618aff8b6
-Directory: 2.7/buster/slim
+GitCommit: e1bd3d07b1b92355bf5358e83732c649c1f93c9f
+Directory: 2.7/slim-buster
 
 Tags: 2.7.3-alpine3.13, 2.7-alpine3.13, 2-alpine3.13, 2.7.3-alpine, 2.7-alpine, 2-alpine
 Architectures: amd64, arm32v6, arm32v7, arm64v8, i386, ppc64le, s390x
-GitCommit: 3904524e5d9e538b33525a602a4bcb7618aff8b6
+GitCommit: e1bd3d07b1b92355bf5358e83732c649c1f93c9f
 Directory: 2.7/alpine3.13
 
 Tags: 2.7.3-alpine3.12, 2.7-alpine3.12, 2-alpine3.12
 Architectures: amd64, arm32v6, arm32v7, arm64v8, i386, ppc64le, s390x
-GitCommit: 3904524e5d9e538b33525a602a4bcb7618aff8b6
+GitCommit: e1bd3d07b1b92355bf5358e83732c649c1f93c9f
 Directory: 2.7/alpine3.12
 
 Tags: 2.6.7-buster, 2.6-buster, 2.6.7, 2.6
 Architectures: amd64, arm32v5, arm32v7, arm64v8, i386, mips64le, ppc64le, s390x
-GitCommit: 3904524e5d9e538b33525a602a4bcb7618aff8b6
+GitCommit: e1bd3d07b1b92355bf5358e83732c649c1f93c9f
 Directory: 2.6/buster
 
 Tags: 2.6.7-slim-buster, 2.6-slim-buster, 2.6.7-slim, 2.6-slim
 Architectures: amd64, arm32v5, arm32v7, arm64v8, i386, mips64le, ppc64le, s390x
-GitCommit: 3904524e5d9e538b33525a602a4bcb7618aff8b6
-Directory: 2.6/buster/slim
+GitCommit: e1bd3d07b1b92355bf5358e83732c649c1f93c9f
+Directory: 2.6/slim-buster
 
 Tags: 2.6.7-stretch, 2.6-stretch
 Architectures: amd64, arm32v5, arm32v7, arm64v8, i386
-GitCommit: 3904524e5d9e538b33525a602a4bcb7618aff8b6
+GitCommit: e1bd3d07b1b92355bf5358e83732c649c1f93c9f
 Directory: 2.6/stretch
 
 Tags: 2.6.7-slim-stretch, 2.6-slim-stretch
 Architectures: amd64, arm32v5, arm32v7, arm64v8, i386
-GitCommit: 3904524e5d9e538b33525a602a4bcb7618aff8b6
-Directory: 2.6/stretch/slim
+GitCommit: e1bd3d07b1b92355bf5358e83732c649c1f93c9f
+Directory: 2.6/slim-stretch
 
 Tags: 2.6.7-alpine3.13, 2.6-alpine3.13, 2.6.7-alpine, 2.6-alpine
 Architectures: amd64, arm32v6, arm32v7, arm64v8, i386, ppc64le, s390x
-GitCommit: 3904524e5d9e538b33525a602a4bcb7618aff8b6
+GitCommit: e1bd3d07b1b92355bf5358e83732c649c1f93c9f
 Directory: 2.6/alpine3.13
 
 Tags: 2.6.7-alpine3.12, 2.6-alpine3.12
 Architectures: amd64, arm32v6, arm32v7, arm64v8, i386, ppc64le, s390x
-GitCommit: 3904524e5d9e538b33525a602a4bcb7618aff8b6
+GitCommit: e1bd3d07b1b92355bf5358e83732c649c1f93c9f
 Directory: 2.6/alpine3.12

@tianon tianon mentioned this pull request Jul 2, 2021
Also add "g++" during compilation (the upstream configure script looks for it, even though it doesn't appear to be used).
@tianon
Copy link
Member Author

tianon commented Jul 8, 2021

Someone(tm) should probably file an issue about not having g++ installed causing Ruby 3.0.2 on Alpine 3.14 to fail to ./configure (even though it doesn't appear to be used)... 😬

@tianon tianon merged commit a1a06ef into docker-library:master Jul 8, 2021
@tianon tianon deleted the jq-template branch July 8, 2021 15:48
tianon added a commit to docker-library/oi-janky-groovy that referenced this pull request Jul 8, 2021
docker-library-bot added a commit to docker-library-bot/official-images that referenced this pull request Jul 8, 2021
Changes:

- docker-library/ruby@a1a06ef: Merge pull request docker-library/ruby#349 from infosiftr/jq-template
- docker-library/ruby@0c5948b: Add Alpine 3.14
- docker-library/ruby@761ae37: Add initial jq-based templating engine
Comment on lines +9 to +18
RUN set -eux; \
apk add --no-cache \
bzip2 \
ca-certificates \
gmp-dev \
libffi-dev \
procps \
yaml-dev \
zlib-dev \
;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the context of #492, I'm trying to remember why we added all this here, and I cannot for the life of me remember why we added all these permanently. 😭

Comment on lines -98 to 115
apk add --no-network --virtual .ruby-rundeps \
$runDeps \
bzip2 \
ca-certificates \
libffi-dev \
procps \
yaml-dev \
zlib-dev \
; \
apk add --no-network --virtual .ruby-rundeps $runDeps; \
apk del --no-network .ruby-builddeps; \
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aha, this is where they moved from - the rundeps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Schemantic error in verification no system-ruby packages installed Dockerfile
3 participants