You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When building the docker image from scratch and trying to run any command (e.g. config, it just prints a blank line and exits with code 1. Same when installing it via npm .
--version or --help work as expected.
This started today afternoon, since then I can't get any newly installed version to work.
Expected behavior
The cli should be doing its job.
Screenshots
$ cat /tmp/aapi/Dockerfile
FROM node:20-alpine
# Set ARG to explicit value to build chosen version. Default is "latest"ARG ASYNCAPI_CLI_VERSION=
# Create a non-root userRUN addgroup -S myuser && adduser -S myuser -G myuser
WORKDIR /app
# Since 0.14.0 release of html-template chromium is needed for pdf generationENV PUPPETEER_EXECUTABLE_PATH /usr/bin/chromium-browser
ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD true
# Since 0.30.0 release Git is supported and required as a dependency# Since 0.14.0 release of html-template chromium is needed for pdf generation.# More custom packages for specific template should not be added to this dockerfile. Instead, we should come up with some extensibility solution.RUN apk --update add git chromium && \
apk add --no-cache --virtual .gyp python3 make g++ && \
rm -rf /var/lib/apt/lists/* && \
rm /var/cache/apk/*
# Installing latest released npm packageRUN npm install --ignore-scripts -g @asyncapi/cli@"$ASYNCAPI_CLI_VERSION"RUN chown -R myuser:myuser /usr/local/lib/node_modules && \
chown -R myuser:myuser /usr/local/bin
# Switch to the non-root userUSER myuser
ENTRYPOINT [ "asyncapi" ]
$ docker build -t aapi-test /tmp/aapi
[+] Building 501.3s (10/10) FINISHED docker:default
=> [internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 1.17kB 0.0s
=> WARN: LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format (line 12) 0.0s
=> WARN: LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format (line 13) 0.0s
=> [internal] load metadata for docker.io/library/node:20-alpine 0.0s
=> [internal] load .dockerignore 0.0s
=> => transferring context: 2B 0.0s
=> CACHED [1/6] FROM docker.io/library/node:20-alpine 0.0s
=> [2/6] RUN addgroup -S myuser && adduser -S myuser -G myuser 0.2s
=> [3/6] WORKDIR /app 0.1s
=> [4/6] RUN apk --update add git chromium && apk add --no-cache --virtual .gyp python3 make g++ && rm -rf /var/lib/apt/lists/*&& rm /var/cache/apk 170.0s
=> [5/6] RUN npm install --ignore-scripts -g @asyncapi/cli@"" 76.0s
=> [6/6] RUN chown -R myuser:myuser /usr/local/lib/node_modules && chown -R myuser:myuser /usr/local/bin 245.6s
=> exporting to image 9.1s
=> => exporting layers 9.0s
=> => writing image sha256:54de8c4e1271f2eafbd1012c5ec867ef8f797a250650c464f4eab69f761dddea 0.0s
=> => naming to docker.io/library/aapi-test 0.0s
2 warnings found (use --debug to expand):
- LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format (line 12)
- LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format (line 13)
# Just executing without arguments works
$ docker run --rm -it aapi-test
All in one CLI for all AsyncAPI tools
VERSION
@asyncapi/cli/2.1.1 linux-x64 node-v20.15.1
USAGE
$ asyncapi [COMMAND]
TOPICS
config CLI config settings
generate Generate models and template
new Creates a new asyncapi file
start
COMMANDS
bundle Bundle one or multiple AsyncAPI Documents and their references together.
config CLI config settings
convert Convert asyncapi documents older to newer versions
diff Find diff between two asyncapi files
generate Generate typed models or other things like clients, applications or docs using AsyncAPI Generator templates.
new Creates a new asyncapi file
optimize optimize asyncapi specification file
start
validate validate asyncapi file
# Trying to run config does not work (no output and return code 1)
$ docker run --rm -it aapi-test config
$ echo$?
1
Welcome to AsyncAPI. Thanks a lot for reporting your first issue. Please check out our contributors guide and the instructions about a basic recommended setup useful for opening a pull request. Keep in mind there are also other channels you can use to interact with AsyncAPI community. For more details check out this issue.
Describe the bug.
When building the docker image from scratch and trying to run any command (e.g.
config
, it just prints a blank line and exits with code 1. Same when installing it via npm .--version
or--help
work as expected.This started today afternoon, since then I can't get any newly installed version to work.
Expected behavior
The cli should be doing its job.
Screenshots
How to Reproduce
Dockerfile
from the repoconfig
/generate
..Please see execution report above.
🥦 Browser
None
👀 Have you checked for similar open issues?
🏢 Have you read the Contributing Guidelines?
Are you willing to work on this issue ?
None
The text was updated successfully, but these errors were encountered: