mirror of
https://github.com/sergi0g/cup.git
synced 2025-11-10 22:23:48 -05:00
58 lines
2.0 KiB
Plaintext
58 lines
2.0 KiB
Plaintext
import { Steps, Callout, Card, Cards } from "nextra-theme-docs";
|
|
import { IconPaint, IconLockOpen, IconKey } from '@tabler/icons-react';
|
|
|
|
# Configuration
|
|
|
|
## Custom docker socket
|
|
|
|
Sometimes, there may be a need to specify a custom docker socket. Cup provides the `-s` option for this.
|
|
|
|
For example, if using Podman, you might do
|
|
|
|
```
|
|
$ cup -s /run/user/1000/podman/podman.sock check
|
|
```
|
|
|
|
This option will hopefully be moved to the configuration file soon.
|
|
|
|
## Configuration file
|
|
|
|
Cup has an option to be configured from a configuration file named `cup.json`.
|
|
|
|
<Steps>
|
|
### Create the configuration file
|
|
Create a `cup.json` file somewhere on your system. For binary installs, a path like `~/.config/cup.json` is recommended.
|
|
If you're running with Docker, you can create a `cup.json` in the directory you're running cup and mount it into the container. _In the next section you will need to use the path where you **mounted** the file_
|
|
|
|
### Configure Cup from the configuration file
|
|
Follow the guides below to customize your `cup.json`
|
|
|
|
<Cards>
|
|
<Card icon={<IconKey />} title="Authentication" href="/docs/configuration/authentication" />
|
|
<Card icon={<IconLockOpen />} title="Insecure registries" href="/docs/configuration/insecure-registries" />
|
|
<Card icon={<IconPaint />} title="Theme" href="/docs/configuration/theme" />
|
|
</Cards>
|
|
|
|
Here's a full example:
|
|
```json
|
|
{
|
|
"authentication": {
|
|
"ghcr.io": "<YOUR_TOKEN_HERE>",
|
|
"registry-1.docker.io": "<YOUR_TOKEN_HERE>"
|
|
},
|
|
"theme": "blue",
|
|
"insecure_registries": ["localhost:5000", "my-insecure-registry.example.com"]
|
|
}
|
|
```
|
|
|
|
### Run Cup with the new configuration file
|
|
To let Cup know that you'd like it to use a custom configuration file, you can use the `-c` flag, followed by the _absolute_ path of the file.
|
|
|
|
```bash
|
|
$ cup -c /home/sergio/.config/cup.json check
|
|
```
|
|
|
|
```bash
|
|
$ docker run -tv /var/run/docker.sock:/var/run/docker.sock -v /home/sergio/.config/cup.json:/config/cup.json ghcr.io/sergi0g/cup -c /config/cup.json serve
|
|
```
|
|
</Steps> |