Skip to content
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

feat: add Dockerfile and its release pipeline #598

Merged
merged 16 commits into from
Jun 2, 2023

Conversation

Savio629
Copy link
Contributor

Description

Draft PR
-Added Docker using npm (researching using linux-curl)
-Added worflow for docker
-Added docker:build script

Related issue(s)
Resolves #358

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Welcome to AsyncAPI. Thanks a lot for creating your first pull request. Please check out our contributors guide 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.

@Savio629
Copy link
Contributor Author

@derberg

@derberg derberg changed the title feat: added Dockerfile and release pipeline feat: add Dockerfile and release pipeline May 29, 2023
@derberg
Copy link
Member

derberg commented May 29, 2023

@Savio629 so far so good, just solve merge conflicts

are you still exploring alternative solution?

I was also wondering if you could add https://github.com/marketplace/actions/docker-hub-readme-description-sync as another step in the automation, after pushing to docker? as apparently docker do not pick github readme by default

@Savio629
Copy link
Contributor Author

I'm exploring the alternative solution, I'll update you by tomorrow.
I'll solve the merge conflicts and update the workflows as mentioned.
Have you gone through the workflow? I have updated the part which was deprecated.

@derberg derberg changed the title feat: add Dockerfile and release pipeline feat: add Dockerfile and its release pipeline May 30, 2023
@derberg
Copy link
Member

derberg commented May 30, 2023

@Savio629 yup, all good with workflows, you can remove #old syntax echo "::set-output name=value::$(echo $VERSION_WITHOUT_V)". Great you remembered to use the new way

Copy link
Member

@derberg derberg left a comment

Choose a reason for hiding this comment

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

all good, just apply my suggestion to make it run on release

.github/workflows/release-docker.yml Outdated Show resolved Hide resolved
@derberg
Copy link
Member

derberg commented Jun 1, 2023

@Savio629 can you also have a look on sonarcloud complain about security?

@Savio629
Copy link
Contributor Author

Savio629 commented Jun 1, 2023

@derberg Fixed one of the warnings but the second warning tells me to run the dockerfile in nonroot user but while doing so git, chromium and aysncapi/cli are not able to install due to permissions...
I tried to add USER command after installing but then while running the image it throw an error regarding the permissions.
In other asyncapi repoitories inside dockerfile I didn't found anyone using nonroot user.

@derberg
Copy link
Member

derberg commented Jun 1, 2023

@Savio629 but sonar said to use --ignore-scripts not --install-scripts

@Savio629
Copy link
Contributor Author

Savio629 commented Jun 1, 2023

Yeah I updated the pr.
Mistyped...

Dockerfile Outdated Show resolved Hide resolved
@sonarcloud
Copy link

sonarcloud bot commented Jun 2, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@derberg
Copy link
Member

derberg commented Jun 2, 2023

/rtm

Thanks 🙏

@asyncapi-bot asyncapi-bot merged commit 1ec904e into asyncapi:master Jun 2, 2023
@asyncapi-bot
Copy link
Contributor

🎉 This PR is included in version 0.47.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

docker push asyncapi/cli:${{ steps.version.outputs.value }}
docker push asyncapi/cli:latest

- name : Sync README.md and Description to Docker Hub
Copy link
Contributor

Choose a reason for hiding this comment

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

Does it really need a secund checkout action?

rm /var/cache/apk/*

# Installing latest released npm package
RUN npm install --ignore-scripts -g @asyncapi/cli
Copy link
Contributor

Choose a reason for hiding this comment

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

I think the cli version should be configurable, because then you don't know which version is inside the container

# Switch to the non-root user
USER myuser

ENTRYPOINT [ "asyncapi" ]
Copy link
Contributor

Choose a reason for hiding this comment

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

Empty line missing

@@ -177,4 +178,4 @@
"get-version": "echo $npm_package_version"
},
"types": "lib/index.d.ts"
}
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Empty line missing

@derberg
Copy link
Member

derberg commented Jun 27, 2023

@Ferror the PR is already merged, please open up a followup to improve it 🙏🏼

@asyncapi-bot asyncapi-bot added the bounty AsyncAPI Bounty program related label label Aug 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bounty AsyncAPI Bounty program related label ready-to-merge released
Projects
Status: Completed
Development

Successfully merging this pull request may close these issues.

Add Dockerfile and release pipeline
4 participants