-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
[nats] Release v1.0.2 #3206
[nats] Release v1.0.2 #3206
Conversation
The Windows Docker Images were not working. This release fixes this. Details can be found [here](https://github.com/nats-io/gnatsd/releases/tag/v1.0.2)
Diff:diff --git a/_bashbrew-list b/_bashbrew-list
index 617d648..610cd62 100644
--- a/_bashbrew-list
+++ b/_bashbrew-list
@@ -1,6 +1,6 @@
-nats:1.0.0
-nats:1.0.0-nanoserver
-nats:1.0.0-windowsservercore
+nats:1.0.2
+nats:1.0.2-nanoserver
+nats:1.0.2-windowsservercore
nats:latest
nats:nanoserver
nats:windowsservercore
diff --git a/nats_latest/gnatsd b/nats_latest/gnatsd
index f3fef94..62bf5e6 100755
Binary files a/nats_latest/gnatsd and b/nats_latest/gnatsd differ
diff --git a/nats_nanoserver/Dockerfile b/nats_nanoserver/Dockerfile
index 375c704..8958474 100644
--- a/nats_nanoserver/Dockerfile
+++ b/nats_nanoserver/Dockerfile
@@ -1,16 +1,14 @@
-# escape=`
FROM microsoft/nanoserver
-SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
-ENV NATS_VERSION="v1.0.0"
-
-# Download and expand released version
-RUN Invoke-WebRequest -OutFile gnatsd.zip "https://github.com/nats-io/gnatsd/releases/download/$($env:NATS_VERSION)/gnatsd-$($env:NATS_VERSION)-windows-amd64.zip" -UseBasicParsing ; `
- Expand-Archive gnatsd.zip -DestinationPath C:\ ; `
- Move-Item "C:/gnatsd-$($env:NATS_VERSION)-windows-amd64" 'c:/gnatsd'; `
- Remove-Item gnatsd.zip
+# The NAT Server will look for this environment variable.
+# When set, it prevents the use of the service API to detect
+# if it is running in interactive mode or not, which is
+# failing in the context of a Docker container.
+# (https://github.com/nats-io/gnatsd/issues/543)
+ENV NATS_DOCKERIZED=1
WORKDIR c:/gnatsd
+COPY gnatsd.exe gnatsd.exe
COPY gnatsd.conf gnatsd.conf
# Expose client, management, and cluster ports
diff --git a/nats_latest/gnatsd b/nats_nanoserver/gnatsd.exe
similarity index 46%
copy from nats_latest/gnatsd
copy to nats_nanoserver/gnatsd.exe
index f3fef94..756ca0a 100755
Binary files a/nats_latest/gnatsd and b/nats_nanoserver/gnatsd.exe differ
diff --git a/nats_windowsservercore/Dockerfile b/nats_windowsservercore/Dockerfile
index 301cb94..28752cc 100644
--- a/nats_windowsservercore/Dockerfile
+++ b/nats_windowsservercore/Dockerfile
@@ -1,16 +1,14 @@
-# escape=`
FROM microsoft/windowsservercore
-SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
-ENV NATS_VERSION="v1.0.0"
-
-# Download and expand released version
-RUN Invoke-WebRequest -OutFile gnatsd.zip "https://github.com/nats-io/gnatsd/releases/download/$($env:NATS_VERSION)/gnatsd-$($env:NATS_VERSION)-windows-amd64.zip" -UseBasicParsing ; `
- Expand-Archive gnatsd.zip -DestinationPath C:\ ; `
- Move-Item "C:/gnatsd-$($env:NATS_VERSION)-windows-amd64" 'c:/gnatsd'; `
- Remove-Item gnatsd.zip
+# The NAT Server will look for this environment variable.
+# When set, it prevents the use of the service API to detect
+# if it is running in interactive mode or not, which is
+# failing in the context of a Docker container.
+# (https://github.com/nats-io/gnatsd/issues/543)
+ENV NATS_DOCKERIZED=1
WORKDIR c:/gnatsd
+COPY gnatsd.exe gnatsd.exe
COPY gnatsd.conf gnatsd.conf
# Expose client, management, and cluster ports
diff --git a/nats_latest/gnatsd b/nats_windowsservercore/gnatsd.exe
similarity index 46%
copy from nats_latest/gnatsd
copy to nats_windowsservercore/gnatsd.exe
index f3fef94..756ca0a 100755
Binary files a/nats_latest/gnatsd and b/nats_windowsservercore/gnatsd.exe differ |
Build test of #3206; 7bcda51 ( $ bashbrew build nats:1.0.2
Building bashbrew/cache:68298cd46f63cdcc7dd02b495ee983384e7f6724a87ac89885c8612cc2ae0148 (nats:1.0.2)
Tagging nats:1.0.2
Tagging nats:latest
$ test/run.sh nats:1.0.2
testing nats:1.0.2
'cve-2014--shellshock' [1/2]...passed
'override-cmd' [2/2]...image does not appear to contain "echo" -- assuming single-binary image
passed
$ bashbrew build nats:1.0.2-nanoserver
skipping "nats:1.0.2-nanoserver" (due to architecture "amd64"; only "windows-amd64" supported)
$ test/run.sh nats:1.0.2-nanoserver
testing nats:1.0.2-nanoserver
image does not exist!
$ bashbrew build nats:1.0.2-windowsservercore
skipping "nats:1.0.2-windowsservercore" (due to architecture "amd64"; only "windows-amd64" supported)
$ test/run.sh nats:1.0.2-windowsservercore
testing nats:1.0.2-windowsservercore
image does not exist!
The following images failed at least one test:
|
@yosifkit I am planning on adding arm64v8 (and some other architectures) to NATS docker image, however, since our image is built from scratch, as I understand it, our |
@kozlovic my comment over at gliderlabs/docker-alpine#304 (comment) probably has some useful info/links (#3024, #3031, https://github.com/tianon/docker-brew-alpine-multiarch); #3176 is another good example 👍 Happy to help describe further or implement anything to make this happen! 👍 |
Since hello-world is also just a single binary image, docker-library/hello-world#31 might be a good example too. |
So I am either doing something wrong, or when built on your side, the |
That'd be because Docker for Mac is injecting QEMU for you in order to run those non-amd64 binaries natively, but QEMU doesn't support running Go binaries 100% properly (I think golang/go#1508 is the correct Go upstream issue about that). 😄 |
golang/go#13024 is another useful discussion about the issue. |
But does this mean that it would work if built as part of the PR (I expect that you guys don't build from a Mac ;-)). |
Yeah, it should -- we build on real arm64 hardware. 👍
|
If I were to add a tag (say 1.0.3-beta) for the new architectures, with both source and the For instance:
Once the images are built and I can verify that they seem to work, I would then issue a product release 1.0.4 and consolidate the amd64 and those 2 new arch under the same latest tag (and of course have a new PR to this repo). Thank you so much for the help so far! |
It should be fine to have a release that is only non-amd64 images. Due to the way the code validates each section, they still need a valid default +Tags: 1.0.3-beta
+Architectures: arm32v7, arm64v8
# this still needs to be fetchable, probably just use the same values as one of the arches
# and leave off the corresponding "arch-*" fields
+GitCommit: <commit to branch>
+Directory: arm32v7
# if they are on a different branch from master, then you'll need this:
+GitFetch: refs/heads/branch-name
+arm32v7-GitCommit: <commit to branch>
+arm32v7-Directory: arm32v7
+arm64v8-GitCommit: <commit to branch>
+arm64v8-Directory: arm64v8 |
Sorry, I am bit confused. For this experiment, yes, they would be in a different branch than master. |
Here's what I'd recommend:
|
You found the branch I was referring to and did all the work for me. Thanks! and sorry to be a pain ;-) |
The Windows Docker Images were not working. This release fixes this.
Details can be found here