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

Publish docker image in CI #146

Closed
srid opened this issue Apr 27, 2020 · 6 comments
Closed

Publish docker image in CI #146

srid opened this issue Apr 27, 2020 · 6 comments
Assignees
Labels
such-is-nix "Why Nix?", "Nix alternative", etc.
Milestone

Comments

@srid
Copy link
Owner

srid commented Apr 27, 2020

CI should automatically publish the docker image from the project root's docker.nix.

In effect, run these commands in CI:

docker load -i $(nix-build docker.nix)
docker login -u sridca -p ${DOCKER_PASS}
docker push sridca/neuron:latest
@srid srid removed the up for grabs label Jun 5, 2020
@srid srid added the such-is-nix "Why Nix?", "Nix alternative", etc. label Jun 19, 2020
@srid srid added the good first issue Good for newcomers label Jul 19, 2020
@srid
Copy link
Owner Author

srid commented Jul 19, 2020

Running neuron through docker is as simple as:

docker run --rm -i -p 8080:8080 -v ~/zettelkasten:/zettelkasten sridca/neuron:test neuron rib -ws 0.0.0.0:8080

It will download only about 80MB of image.

@TheMatten
Copy link
Contributor

Docker seems to be preinstalled on Ubuntu runners, so adding step

- name: Publish nightly Docker image
  run: |
    docker load -i $(nix-build docker.nix --arg tag '"nightly"')
    docker login -u sridca -p ${DOCKER_PASS}
    docker push sridca/neuron:nightly

should be enough?

@srid srid added this to the 0.6 milestone Jul 20, 2020
@srid srid removed the good first issue Good for newcomers label Jul 20, 2020
@srid srid self-assigned this Jul 20, 2020
@srid
Copy link
Owner Author

srid commented Jul 20, 2020

Done in master. Image name: sridca/neuron will auto-update in CI.

$ sudo docker run -i sridca/neuron neuron --version
0.5.11.1

@TheMatten You can use this for GitLab CI.

I'll close this issue once documentation is updated (alternative install; and describe docker-based usage).

@TheMatten
Copy link
Contributor

Done - and it works 🎉 : https://gitlab.com/thematten/neuron-template/-/jobs/646875219

@TheMatten
Copy link
Contributor

TheMatten commented Jul 20, 2020

Should I somehow update #298 or are those docs changes meant to be made separately?

@srid
Copy link
Owner Author

srid commented Jul 20, 2020

I'll write the docs, as well as make some changes to #298.

srid added a commit that referenced this issue Jul 20, 2020
@srid srid closed this as completed Jul 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
such-is-nix "Why Nix?", "Nix alternative", etc.
Projects
None yet
Development

No branches or pull requests

2 participants