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

Support mounting anonymous volume #1853

Merged
merged 1 commit into from
Feb 2, 2024

Conversation

mzagozen
Copy link
Contributor

@mzagozen mzagozen commented Feb 2, 2024

The docker run ... -v /path/to/dir syntax creates an anonymous volume and mounts it to the given destination path in the container.

The `docker run ... -v /path/to/dir` syntax creates an anonymous volume
and mounts it to the given path in the container.
@hellt
Copy link
Member

hellt commented Feb 2, 2024

Thanks @mzagozen

can you add a bit of a context how are you using this anon volume so that we can provide some hints in the docs?

Copy link

codecov bot commented Feb 2, 2024

Codecov Report

Attention: 10 lines in your changes are missing coverage. Please review.

Comparison is base (30dfa30) 51.82% compared to head (a2b9ca6) 51.75%.
Report is 3 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1853      +/-   ##
==========================================
- Coverage   51.82%   51.75%   -0.08%     
==========================================
  Files         148      148              
  Lines       14548    14560      +12     
==========================================
- Hits         7539     7535       -4     
- Misses       6176     6189      +13     
- Partials      833      836       +3     
Files Coverage Δ
clab/config.go 65.83% <0.00%> (-0.75%) ⬇️
types/bind.go 45.71% <40.00%> (-4.29%) ⬇️

... and 1 file with indirect coverage changes

@mzagozen
Copy link
Contributor Author

mzagozen commented Feb 2, 2024

Sure, we have topologies that include a Cisco NSO container based on nso-docker, like so:

topology:
    nso:
      kind: linux
      image: ${NSO_IMAGE}
      binds:
        - /var/opt/ncs/packages

The path /var/opt/ncs/packages is the NSO package load path - where it loads user code from. We have an existing development workflow where we use this anonymous volume to then update the code (NSO packages) in the running NSO container by running a sidecar container for compilation. This sidecar attaches to the anonymous volume mounted in the NSO container with the command docker run --volumes-from ${NSO_CNT} ...

From https://gitlab.com/nso-developer/nso-docker/-/blob/master/skeletons/system/testenvs/testenv-common.mk?ref_type=heads#L66:

docker run -t --rm -v $(PROJECT_DIR):/src --volumes-from $${NSO} $(NSO_IMAGE_PATH)cisco-nso-dev:$(NSO_VERSION) bash -lc 'rsync -aEim -- ...

@hellt
Copy link
Member

hellt commented Feb 2, 2024

thanks

@hellt hellt merged commit 6db621d into srl-labs:main Feb 2, 2024
56 of 57 checks passed
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