Skip to content

Commit

Permalink
Update to Ruby 3.3 and alpine 3.20
Browse files Browse the repository at this point in the history
Signed-off-by: Orgad Shaneh <[email protected]>
  • Loading branch information
orgads committed Sep 5, 2024
1 parent 5fb50cd commit 4540850
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 22 deletions.
16 changes: 8 additions & 8 deletions Dockerfile.template.erb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ FROM mcr.microsoft.com/dotnet/framework/runtime:4.8-windowsservercore-<%= window
<% if is_armhf %>
FROM resin/armhf-alpine:3.7
<% else %>
FROM alpine:3.19
FROM alpine:3.20
<% end %>
<% else %>
<% if is_armhf %>
Expand All @@ -29,7 +29,7 @@ ENV QEMU_DOWNLOAD_SHA256 47ae430b0e7c25e1bde290ac447a720e2ea6c6e78cd84e44847edda
RUN apk add curl --no-cache
RUN curl -sL -o qemu-3.0.0+resin-arm.tar.gz https://github.com/balena-io/qemu/releases/download/v3.0.0%2Bresin/qemu-3.0.0+resin-arm.tar.gz && echo "$QEMU_DOWNLOAD_SHA256 *qemu-3.0.0+resin-arm.tar.gz" | sha256sum -c - | tar zxvf qemu-3.0.0+resin-arm.tar.gz -C . && mv qemu-3.0.0+resin-arm/qemu-arm-static .

FROM --platform=linux/arm/v7 arm32v7/ruby:3.2-slim-bookworm
FROM --platform=linux/arm/v7 arm32v7/ruby:3.3-slim-bookworm
COPY --from=builder /go/qemu-arm-static /usr/bin/
<% elsif is_arm64 %>
# To set multiarch build for Docker hub automated build.
Expand All @@ -39,10 +39,10 @@ ENV QEMU_DOWNLOAD_SHA256 5db25cccb40ac7b1ca857653b883376b931d91b06ff34ffe70dcf61
RUN apk add curl --no-cache
RUN curl -sL -o qemu-6.0.0.balena1-aarch64.tar.gz https://github.com/balena-io/qemu/releases/download/v6.0.0%2Bbalena1/qemu-6.0.0.balena1-aarch64.tar.gz && echo "$QEMU_DOWNLOAD_SHA256 *qemu-6.0.0.balena1-aarch64.tar.gz" | sha256sum -c - | tar zxvf qemu-6.0.0.balena1-aarch64.tar.gz -C . && mv qemu-6.0.0+balena1-aarch64/qemu-aarch64-static .

FROM --platform=linux/arm64 arm64v8/ruby:3.2-slim-bookworm
FROM --platform=linux/arm64 arm64v8/ruby:3.3-slim-bookworm
COPY --from=builder /go/qemu-aarch64-static /usr/bin/
<% else %>
FROM ruby:3.2-slim-bookworm
FROM ruby:3.3-slim-bookworm
<% end %>
<% end %>
<% end %>
Expand Down Expand Up @@ -73,22 +73,22 @@ ENV TINI_VERSION=0.18.0
RUN powershell -Command "Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))"

# NOTE: For avoiding stalling with docker build on windows, we must use latest version of msys2.
RUN choco install -y ruby --version 3.2.4.1 --params "'/InstallDir:C:\ruby32'" \
&& choco install -y msys2 --version 20240507.0.0 --params "'/NoPath /NoUpdate /InstallDir:C:\ruby32\msys64'"
RUN choco install -y ruby --version 3.3.4.1 --params "'/InstallDir:C:\ruby32'" \
&& choco install -y msys2 --version 20240727.0.0 --params "'/NoPath /NoUpdate /InstallDir:C:\ruby32\msys64'"
RUN refreshenv \
&& ridk install 3 \
&& echo gem: --no-document >> C:\ProgramData\gemrc \
&& gem install oj -v 3.16.5 \
&& gem install json -v 2.7.2 \
&& gem install rexml -v 3.3.5 \
&& gem install rexml -v 3.3.7 \
&& gem install fluentd -v <%= fluentd_ver %> \
&& gem install win32-service -v 2.3.2 \
&& gem install win32-ipc -v 0.7.0 \
&& gem install win32-event -v 0.6.3 \
&& gem sources --clear-all

# Remove gem cache and chocolatey
RUN powershell -Command "Remove-Item -Force C:\ruby32\lib\ruby\gems\3.2.0\cache\*.gem; Remove-Item -Recurse -Force 'C:\ProgramData\chocolatey'"
RUN powershell -Command "Remove-Item -Force C:\ruby32\lib\ruby\gems\3.3.0\cache\*.gem; Remove-Item -Recurse -Force 'C:\ProgramData\chocolatey'"

COPY fluent.conf /fluent/conf/fluent.conf
<% else %>
Expand Down
4 changes: 2 additions & 2 deletions test/suite.bats
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@
}


@test "ruby version is 3.2" {
@test "ruby version is 3.3" {
run docker run --rm $IMAGE sh -c "ruby --version | cut -d ' ' -f 2"
[ "$status" -eq 0 ]

major=$(echo "$output" | cut -d '.' -f 1)
minor=$(echo "$output" | cut -d '.' -f 2)
[ "$major" -eq "3" ]
[[ "$minor" -eq "2" ]]
[[ "$minor" -eq "3" ]]
}


Expand Down
2 changes: 1 addition & 1 deletion v1.17/alpine/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# AUTOMATICALLY GENERATED
# DO NOT EDIT THIS FILE DIRECTLY, USE /Dockerfile.template.erb

FROM alpine:3.19
FROM alpine:3.20
LABEL maintainer "Fluentd developers <[email protected]>"
LABEL Description="Fluentd docker image" Vendor="Fluent Organization" Version="1.17.1"

Expand Down
2 changes: 1 addition & 1 deletion v1.17/arm64/debian/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ ENV QEMU_DOWNLOAD_SHA256 5db25cccb40ac7b1ca857653b883376b931d91b06ff34ffe70dcf61
RUN apk add curl --no-cache
RUN curl -sL -o qemu-6.0.0.balena1-aarch64.tar.gz https://github.com/balena-io/qemu/releases/download/v6.0.0%2Bbalena1/qemu-6.0.0.balena1-aarch64.tar.gz && echo "$QEMU_DOWNLOAD_SHA256 *qemu-6.0.0.balena1-aarch64.tar.gz" | sha256sum -c - | tar zxvf qemu-6.0.0.balena1-aarch64.tar.gz -C . && mv qemu-6.0.0+balena1-aarch64/qemu-aarch64-static .

FROM --platform=linux/arm64 arm64v8/ruby:3.2-slim-bookworm
FROM --platform=linux/arm64 arm64v8/ruby:3.3-slim-bookworm
COPY --from=builder /go/qemu-aarch64-static /usr/bin/
LABEL maintainer "Fluentd developers <[email protected]>"
LABEL Description="Fluentd docker image" Vendor="Fluent Organization" Version="1.17.1"
Expand Down
2 changes: 1 addition & 1 deletion v1.17/armhf/debian/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ ENV QEMU_DOWNLOAD_SHA256 47ae430b0e7c25e1bde290ac447a720e2ea6c6e78cd84e44847edda
RUN apk add curl --no-cache
RUN curl -sL -o qemu-3.0.0+resin-arm.tar.gz https://github.com/balena-io/qemu/releases/download/v3.0.0%2Bresin/qemu-3.0.0+resin-arm.tar.gz && echo "$QEMU_DOWNLOAD_SHA256 *qemu-3.0.0+resin-arm.tar.gz" | sha256sum -c - | tar zxvf qemu-3.0.0+resin-arm.tar.gz -C . && mv qemu-3.0.0+resin-arm/qemu-arm-static .

FROM --platform=linux/arm/v7 arm32v7/ruby:3.2-slim-bookworm
FROM --platform=linux/arm/v7 arm32v7/ruby:3.3-slim-bookworm
COPY --from=builder /go/qemu-arm-static /usr/bin/
LABEL maintainer "Fluentd developers <[email protected]>"
LABEL Description="Fluentd docker image" Vendor="Fluent Organization" Version="1.17.1"
Expand Down
2 changes: 1 addition & 1 deletion v1.17/debian/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# AUTOMATICALLY GENERATED
# DO NOT EDIT THIS FILE DIRECTLY, USE /Dockerfile.template.erb

FROM ruby:3.2-slim-bookworm
FROM ruby:3.3-slim-bookworm
LABEL maintainer "Fluentd developers <[email protected]>"
LABEL Description="Fluentd docker image" Vendor="Fluent Organization" Version="1.17.1"
ENV TINI_VERSION=0.18.0
Expand Down
8 changes: 4 additions & 4 deletions v1.17/windows-ltsc2019/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,22 @@ LABEL Description="Fluentd docker image" Vendor="Fluent Organization" Version="1
RUN powershell -Command "Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))"

# NOTE: For avoiding stalling with docker build on windows, we must use latest version of msys2.
RUN choco install -y ruby --version 3.2.4.1 --params "'/InstallDir:C:\ruby32'" \
&& choco install -y msys2 --version 20240507.0.0 --params "'/NoPath /NoUpdate /InstallDir:C:\ruby32\msys64'"
RUN choco install -y ruby --version 3.3.4.1 --params "'/InstallDir:C:\ruby32'" \
&& choco install -y msys2 --version 20240727.0.0 --params "'/NoPath /NoUpdate /InstallDir:C:\ruby32\msys64'"
RUN refreshenv \
&& ridk install 3 \
&& echo gem: --no-document >> C:\ProgramData\gemrc \
&& gem install oj -v 3.16.5 \
&& gem install json -v 2.7.2 \
&& gem install rexml -v 3.3.5 \
&& gem install rexml -v 3.3.7 \
&& gem install fluentd -v 1.17.1 \
&& gem install win32-service -v 2.3.2 \
&& gem install win32-ipc -v 0.7.0 \
&& gem install win32-event -v 0.6.3 \
&& gem sources --clear-all

# Remove gem cache and chocolatey
RUN powershell -Command "Remove-Item -Force C:\ruby32\lib\ruby\gems\3.2.0\cache\*.gem; Remove-Item -Recurse -Force 'C:\ProgramData\chocolatey'"
RUN powershell -Command "Remove-Item -Force C:\ruby32\lib\ruby\gems\3.3.0\cache\*.gem; Remove-Item -Recurse -Force 'C:\ProgramData\chocolatey'"

COPY fluent.conf /fluent/conf/fluent.conf

Expand Down
8 changes: 4 additions & 4 deletions v1.17/windows-ltsc2022/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,22 @@ LABEL Description="Fluentd docker image" Vendor="Fluent Organization" Version="1
RUN powershell -Command "Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))"

# NOTE: For avoiding stalling with docker build on windows, we must use latest version of msys2.
RUN choco install -y ruby --version 3.2.4.1 --params "'/InstallDir:C:\ruby32'" \
&& choco install -y msys2 --version 20240507.0.0 --params "'/NoPath /NoUpdate /InstallDir:C:\ruby32\msys64'"
RUN choco install -y ruby --version 3.3.4.1 --params "'/InstallDir:C:\ruby32'" \
&& choco install -y msys2 --version 20240727.0.0 --params "'/NoPath /NoUpdate /InstallDir:C:\ruby32\msys64'"
RUN refreshenv \
&& ridk install 3 \
&& echo gem: --no-document >> C:\ProgramData\gemrc \
&& gem install oj -v 3.16.5 \
&& gem install json -v 2.7.2 \
&& gem install rexml -v 3.3.5 \
&& gem install rexml -v 3.3.7 \
&& gem install fluentd -v 1.17.1 \
&& gem install win32-service -v 2.3.2 \
&& gem install win32-ipc -v 0.7.0 \
&& gem install win32-event -v 0.6.3 \
&& gem sources --clear-all

# Remove gem cache and chocolatey
RUN powershell -Command "Remove-Item -Force C:\ruby32\lib\ruby\gems\3.2.0\cache\*.gem; Remove-Item -Recurse -Force 'C:\ProgramData\chocolatey'"
RUN powershell -Command "Remove-Item -Force C:\ruby32\lib\ruby\gems\3.3.0\cache\*.gem; Remove-Item -Recurse -Force 'C:\ProgramData\chocolatey'"

COPY fluent.conf /fluent/conf/fluent.conf

Expand Down

0 comments on commit 4540850

Please sign in to comment.