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
Copy file name to clipboardExpand all lines: docs/_docs/client.md
-145
Original file line number
Diff line number
Diff line change
@@ -194,151 +194,6 @@ Of course, do this at your own risk! That is a *CHONKER*!
194
194
<hr>
195
195
<br>
196
196
197
-
# Singularity Registry Client
198
-
199
-
Singularity Registry Global Client, or [sregistry-cli](https://github.com/singularityhub/sregistry-cli),
200
-
is a general client to interact with Singularity images at remote endpoints, and it provides
201
-
such an endpoint for Singularity Registry Server. We will provide
202
-
basic instructions here, and forthe full documentation, please see the [getting started guide here](https://singularityhub.github.io/sregistry-cli/client-registry). Note that you will need to [export your credentials](https://singularityhub.github.io/sregistry/credentials)in order to have authenticated interaction with sregistry.
203
-
204
-
205
-
## Install
206
-
207
-
### sregistry Installation
208
-
209
-
`sregistry` is the client for Singularity Registry server. To install, you can do the following:
To check your install, run this command to make sure the `sregistry` client is found.
218
-
219
-
which sregistry
220
-
221
-
222
-
### Container Install
223
-
224
-
We have provided a Singularity build definition for you, for which you can use to build a container that serves as the sregistry client (and this will likely be provided on Singularity Hub so you don't even need to do that.) To build, do the following:
225
-
226
-
```bash
227
-
cd sregistry/
228
-
229
-
# Singularity 2.4 and up
230
-
sudo singularity build sregistry Singularity
231
-
232
-
# For Singularity earlier than 2.4 (deprecated)
233
-
singularity create --size 2000 sregistry
234
-
sudo singularity bootstrap sregistry Singularity
235
-
```
236
-
237
-
If you install via this option, you will want to make sure the container itself is somewhere on your path, with appropriate permissions for who you want to be able to use it.
238
-
239
-
240
-
## Commands
241
-
This brief tutorial assumes that you have [Singularity installed](https://singularityware.github.io/install-linux).
242
-
243
-
### Pull
244
-
Not shown in the demo above is the pull command, but it does the same thing as the singularity pull.
This is useful so that you can (locally from your registry) pull an image without needing to specify the registry url. It's also important because registry support will only be added to Singularity when the entire suite of compoenents are ready to go!
253
-
254
-
255
-
### Push
256
-
257
-
If you don't have an image handy, you can pull one:
If you don't specify a tag, `latest` is used. If you have authentication issues,
272
-
remember that you need to [export a token](https://singularityhub.github.io/sregistry/credentials) for your user, and ensure that the user is either an admin/manager, or
273
-
that you have set the `USER_COLLECTIONS` variable to true. You can read [more about roles here](https://singularityhub.github.io/sregistry/setup-roles), and [more about teams](https://singularityhub.github.io/sregistry/setup-teams) to manage groups of people.
274
-
275
-
### List
276
-
277
-
List is a general command that will show a specific container, a specific collection, optionally with a tag. Examples are provided below:
278
-
279
-
```bash
280
-
# All collections
281
-
sregistry list
282
-
283
-
# A particular collection
284
-
sregistry list dinosaur
285
-
286
-
# A particular container name across collections
287
-
sregistry list /avocado
288
-
289
-
# A named container, no tag
290
-
sregistry list dinosaur/avocado
291
-
292
-
# A named container, with tag
293
-
sregistry list dinosaur/avocado:delicious
294
-
```
295
-
296
-
In addition to listing containers, `sregistry` can show you metadata! It does this by issuing an inspect command at upload time, so that no processing is needed on the server side. Singularity Registry is a Dockerized application, so it would require --privileged mode, which is a bad idea. Anyway, we can look at environment (`--env/-e`), runscript (`--runscript/-r`), tests (`--test/-t`), or `Singularity` definition recipe (`--deffile/-d`):
297
-
298
-
```bash
299
-
# Show me environment
300
-
sregistry list dinosaur/tacos:delicious --env
301
-
302
-
# Add runscript
303
-
sregistry list dinosaur/tacos:delicious --e --r
304
-
305
-
# Definition recipe (Singularity) and test
306
-
sregistry list dinosaur/tacos:delicious --d --t
307
-
308
-
# All of them
309
-
sregistry list dinosaur/tacos:delicious --e --r --d --t
310
-
```
311
-
312
-
### Delete
313
-
Delete requires the same authentication as push, and you will need to confirm with `yes/no`
314
-
315
-
```bash
316
-
sregistry delete dinosaur/tacos:delicious
317
-
sregistry list
318
-
```
319
-
320
-
if you want to force it, add `--force`
321
-
322
-
```bash
323
-
sregistry delete dinosaur/tacos:delicious --force
324
-
```
325
-
326
-
### Labels
327
-
Labels are important, and so they are represented as objects in the database for index, query, etc. Akin to containers, we can list and search:
0 commit comments