OCI image for attic
- Nix 100%
|
All checks were successful
ci/woodpecker/push/make Pipeline was successful
|
||
|---|---|---|
| .woodpecker | ||
| flake.lock | ||
| flake.nix | ||
| README.md | ||
Attic OCI image
Build
Build the image attic:latest with:
bash -c '$(nix build --no-link --print-out-paths .) | docker load'
Usage
Create a secret with
export ATTIC_SERVER_TOKEN_RS256_SECRET_BASE64=$(openssl genrsa -traditional 4096 | base64 -w0)
Run with
docker run -it --rm \
-e ATTIC_SERVER_TOKEN_RS256_SECRET_BASE64=$ATTIC_SERVER_TOKEN_RS256_SECRET_BASE64 \
-p 8080:8080 \
-v attic-data:/var/attic \
attic:latest
Create an admin token with
docker exec -it [CONTAINER_NAME] atticadm make-token \
--sub admin-token --validity '999 months' \
--pull '*' --push '*' --create-cache '*' \
--configure-cache '*' --configure-cache-retention '*'
Setup attic client with
nix profile add nixpkgs#attic-client
attic login origin https://example.com [GENERATED_TOKEN]
Check attic docs for further usage