Skip to content

Commit

Permalink
Update NATS server to 2.9.21 (#115)
Browse files Browse the repository at this point in the history
Signed-off-by: Byron Ruth <[email protected]>
  • Loading branch information
bruth authored Aug 4, 2023
1 parent 1edc82d commit 0ba8410
Show file tree
Hide file tree
Showing 13 changed files with 21 additions and 20 deletions.
13 changes: 7 additions & 6 deletions 2.9.20/alpine3.18/Dockerfile → 2.9.21/alpine3.18/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,22 +1,23 @@
FROM alpine:3.18

ENV NATS_SERVER 2.9.20
ENV NATS_SERVER 2.9.21

RUN set -eux; \
apkArch="$(apk --print-arch)"; \
case "$apkArch" in \
aarch64) natsArch='arm64'; sha256='59ebc51e99fd97f92b8ecf3d0ee566aef9e133c2fc0a981e0522c105490c2e99' ;; \
armhf) natsArch='arm6'; sha256='c27abedca49baf59799630505f9e37ae22dc9ec644f0a645537e1b5d33221491' ;; \
armv7) natsArch='arm7'; sha256='fdd51a5c3ed7d47ef5efae1e9861e317df37e385205e45df63c35968650e59e4' ;; \
x86_64) natsArch='amd64'; sha256='626288430030b63a05b1fa79aa6ed84344c29ae78808e62b078add906d77f138' ;; \
x86) natsArch='386'; sha256='7db99a9d9e2b87304dab0745409b51dbb1a366705b0d08bc7da5ad025e30140e' ;; \
aarch64) natsArch='arm64'; sha256='6c2906b5a3b930e842c0a88772b5f484e962ac342f57852a45b1c5a7e10f2197' ;; \
armhf) natsArch='arm6'; sha256='424576d72c1f3b5bd309254d0d0462e21b4aaf6b85defcf6663128294b15c16f' ;; \
armv7) natsArch='arm7'; sha256='3ee6e4db568311c6832b1ec4d76933cc8ee1a783281ed89da5ebe6f602d1c521' ;; \
x86_64) natsArch='amd64'; sha256='2bd2878a63efa5bc9b9c3f1d43fd953c7e14b22ba540f7dea19f7fb3a803215d' ;; \
x86) natsArch='386'; sha256='6eef61e4a81fb03f47ef8bfe08eab6909846a3404db28b4260630385dc27910f' ;; \
*) echo >&2 "error: $apkArch is not supported!"; exit 1 ;; \
esac; \
\
wget -O nats-server.tar.gz "https://github.com/nats-io/nats-server/releases/download/v${NATS_SERVER}/nats-server-v${NATS_SERVER}-linux-${natsArch}.tar.gz"; \
echo "${sha256} *nats-server.tar.gz" | sha256sum -c -; \
\
apk add --no-cache ca-certificates tzdata; \
apk add --upgrade libcrypto3 libssl3; \
\
tar -xf nats-server.tar.gz; \
rm nats-server.tar.gz; \
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ FROM mcr.microsoft.com/windows/nanoserver:1809

ENV NATS_DOCKERIZED 1

COPY --from=nats:2.9.20-windowsservercore-1809 C:\\nats-server.exe C:\\nats-server.exe
COPY --from=nats:2.9.21-windowsservercore-1809 C:\\nats-server.exe C:\\nats-server.exe
COPY nats-server.conf C:\\nats-server.conf

EXPOSE 4222 8222 6222
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion 2.9.20/scratch/Dockerfile → 2.9.21/scratch/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
FROM scratch
COPY --from=nats:2.9.20-alpine3.18 /usr/local/bin/nats-server /nats-server
COPY --from=nats:2.9.21-alpine3.18 /usr/local/bin/nats-server /nats-server
COPY nats-server.conf /nats-server.conf
EXPOSE 4222 8222 6222
ENV PATH="$PATH:/"
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ FROM mcr.microsoft.com/windows/servercore:1809
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop';"]

ENV NATS_DOCKERIZED 1
ENV NATS_SERVER 2.9.20
ENV NATS_SERVER 2.9.21
ENV NATS_SERVER_DOWNLOAD https://github.com/nats-io/nats-server/releases/download/v${NATS_SERVER}/nats-server-v${NATS_SERVER}-windows-amd64.zip
ENV NATS_SERVER_SHASUM 6dd2f4648c3b5f7c0b0a2fc492ecd2263d3dfb22ea5cf2d0c018a82f0e912b35
ENV NATS_SERVER_SHASUM 43df40bcf81e819e3467a31c548643439d4200486f3032c61ae4b134243f8796

RUN Set-PSDebug -Trace 2

Expand Down
6 changes: 3 additions & 3 deletions tests/build-images-2019.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Set-PSDebug -Trace 2
# Exit on error.
$ErrorActionPreference = "Stop"

$ver = 'NATS_SERVER 2.9.20'.Split(' ')[1]
$ver = 'NATS_SERVER 2.9.21'.Split(' ')[1]

Write-Output '-- host info ---'
Write-Output $PSVersionTable
Expand All @@ -13,14 +13,14 @@ Write-Output (Get-WMIObject win32_operatingsystem).OSArchitecture
# The windowsservercore images must be built before the nanoserver images.
cd "${ver}/windowsservercore-1809"
Write-Host "building windowsservercore-1809"
docker build --tag nats:2.9.20-windowsservercore-1809 .
docker build --tag nats:2.9.21-windowsservercore-1809 .
if ($LASTEXITCODE -ne 0) {
exit 1
}

cd ../nanoserver-1809
Write-Host "building nanoserver-1809"
docker build --tag nats:2.9.20-nanoserver-1809 .
docker build --tag nats:2.9.21-nanoserver-1809 .
if ($LASTEXITCODE -ne 0) {
exit 1
}
Expand Down
6 changes: 3 additions & 3 deletions tests/build-images.sh
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
#!/usr/bin/env bash
set -ex

ver=(NATS_SERVER 2.9.20)
ver=(NATS_SERVER 2.9.21)

(
cd "${ver[1]}/alpine3.18"
docker build --tag nats:2.9.20-alpine3.18 .
docker build --tag nats:2.9.21-alpine3.18 .
)

(
cd "${ver[1]}/scratch"
docker build --tag nats:2.9.20-scratch .
docker build --tag nats:2.9.21-scratch .
)
4 changes: 2 additions & 2 deletions tests/run-images-2019.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ Set-PSDebug -Trace 2
$ErrorActionPreference = "Stop"

$images = @(
"nats:2.9.20-windowsservercore-1809",
"nats:2.9.20-nanoserver-1809"
"nats:2.9.21-windowsservercore-1809",
"nats:2.9.21-nanoserver-1809"
)

foreach ($img in $images) {
Expand Down
4 changes: 2 additions & 2 deletions tests/run-images.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
set -ex

images=(
'nats:2.9.20-alpine3.18'
'nats:2.9.20-scratch'
'nats:2.9.21-alpine3.18'
'nats:2.9.21-scratch'
)

for img in "${images[@]}"; do
Expand Down

0 comments on commit 0ba8410

Please sign in to comment.