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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Publish various docker image on git-tag #625

Merged
merged 15 commits into from
Sep 23, 2019
Merged

Publish various docker image on git-tag #625

merged 15 commits into from
Sep 23, 2019

Conversation

DrSensor
Copy link
Contributor

@DrSensor DrSensor commented Sep 8, 2019

Usage

About

This PR is about adding CI for publishing docker image on git-tag with various base image. Hopefully, this can make developing plugin a bit easier for certain scenario.

Motivation

Personally I do this to evaluate the new format of github action, test out how to do cross compilation to put them inside docker image for quick manual test, and finally hoping to replace the legacy github action on one of my project 馃構

Actually I want to use nushell in SBC or MiniPC as a lightweight alternative of osquery. I think nushell is a great project 馃憤

Demo

I'm not yet fully check all the image tag but for now you can try it via:

docker run -it docker.pkg.github.com/drsensor/nushell/nu:0.2-<tag>

see the available tag in this table


I'm also available on discord in case you need to '@mention' or DM me 馃檪

* Add Package.Dockerfile as flexible build source

* Add docker-compose.package.yml as intermediary config

* CI will use new github action YAML format

it only publish the docker image on git tag

* Add debian:latest, debian:slim, and alpine as base image

* Add documentation
Signed-off-by: Fahmi Akbar Wildana <f.a.wildana@gmail.com>
Signed-off-by: Fahmi Akbar Wildana <f.a.wildana@gmail.com>
Signed-off-by: Fahmi Akbar Wildana <f.a.wildana@gmail.com>
Signed-off-by: Fahmi Akbar Wildana <f.a.wildana@gmail.com>
Signed-off-by: Fahmi Akbar Wildana <f.a.wildana@gmail.com>
something weird about CircleCI build
it can't find target/release/nu
although it's whitelisted in the .dockerignore 馃
@DrSensor
Copy link
Contributor Author

DrSensor commented Sep 10, 2019

Status update

$ docker run -it nu:glibc-busybox
/bin/nu: error while loading shared libraries: libdl.so.2: cannot open shared object file: No such file or directory

and

$ docker run -it nu:glibc-distroless
/bin/nu: error while loading shared libraries: libgcc_s.so.1: cannot open shared object file: No such file or directory

still not working when executed directly

@DrSensor DrSensor marked this pull request as ready for review September 10, 2019 22:44
* Add libdl.so.2 for glibc-busybox

* Change base-image of glibc-distroless to gcr.io/distroless/cc
@DrSensor
Copy link
Contributor Author

nu:glibc-distroless now works fine 馃帀
but nu:glibc-busybox still have a problem

$ docker run -it --rm docker.pkg.github.com/drsensor/nushell/nu:glibc-busybox
/bin/nu: error while loading shared libraries: librt.so.1: cannot open shared object file: No such file or directory

@DrSensor
Copy link
Contributor Author

status update: everything works now

@sophiajt
Copy link
Contributor

@DrSensor - great, is there anything I need to do to turn on support for the github action parts so that we can test the CI changes?

@DrSensor
Copy link
Contributor Author

DrSensor commented Sep 18, 2019

@jonathandturner - for quick testing, you can fork my nushell-fork then try git tag on any commit and push the tag. Seems there is no way to try the CI directly on the PR before it merged.


if github package registry enabled

Just add DOCKER_REGISTRY token to Settings > Secrets

if using another docker registry
  1. Add your preferred DOCKER_REGISTRY token to Settings > Secrets
  2. Find and replace all docker.pkg.github.com/${{ github.repository }} in the .github/workflows/docker-publish.yml with your preferred docker-registry/repo. For example:
-REGISTRY: docker.pkg.github.com/${{ github.repository }}
+REGISTRY: quay.io/nushell-test
...
-env: { REGISTRY: 'docker.pkg.github.com/${{ github.repository }}' }
+env: { REGISTRY: 'quay.io/nushell-test' }

@sophiajt
Copy link
Contributor

@DrSensor - might be easier to talk on here rather than discord :)

I'm okay with landing this and testing it after it lands. If it doesn't do what you want, we can revert and try again.

@DrSensor
Copy link
Contributor Author

@jonathandturner sounds good to me 馃憤
I will reopen this PR (or open another PR) if it doesn't work 馃檪

@sophiajt sophiajt merged commit f99d38e into nushell:master Sep 23, 2019
DrSensor added a commit to DrSensor/darkpools_publicapi_ws_pairs that referenced this pull request Nov 1, 2019
not tested yet, there is a high chance it need to be moved into separate repo

this ci config is a ripoff from
nushell/nushell#625
DrSensor added a commit to DrSensor/darkpools_publicapi_ws_pairs that referenced this pull request Nov 1, 2019
not tested yet, there is a high chance it need to be moved into separate repo

this ci config is a ripoff from
nushell/nushell#625
DrSensor added a commit to DrSensor/darkpools_publicapi_ws_pairs that referenced this pull request Nov 1, 2019
not tested yet, there is a high chance it need to be moved into separate repo

this ci config is a ripoff from
nushell/nushell#625
elferherrera pushed a commit to elferherrera/nushell that referenced this pull request Feb 7, 2022
Signed-off-by: nibon7 <nibon7@163.com>
kubouch pushed a commit that referenced this pull request Feb 7, 2022
Signed-off-by: nibon7 <nibon7@163.com>
Hofer-Julian pushed a commit to Hofer-Julian/nushell that referenced this pull request Jan 27, 2023
* Fix docs for all commands

* ci skip

* Refresh docs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants