Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found
Select Git revision
  • master
1 result

Target

Select target project
  • shore/registry-docker
1 result
Select Git revision
  • master
1 result
Show changes
Commits on Source (4)
......@@ -19,13 +19,6 @@ repos:
hooks:
- id: yamllint
- repo: https://github.com/amperser/proselint/
rev: 0.14.0
hooks:
- id: proselint
types: [plain-text]
exclude: LICENSE
- repo: https://github.com/executablebooks/mdformat.git
rev: 0.7.22
hooks:
......
FROM docker.io/library/alpine:3.14
FROM docker.io/library/alpine:3.21
# hadolint ignore=DL3018
RUN echo 'https://dl-cdn.alpinelinux.org/alpine/edge/testing' >> /etc/apk/repositories && \
echo 'https://dl-cdn.alpinelinux.org/alpine/edge/community' >> /etc/apk/repositories && \
RUN echo '@testing https://dl-cdn.alpinelinux.org/alpine/edge/testing' >> /etc/apk/repositories && \
echo '@community https://dl-cdn.alpinelinux.org/alpine/v3.21/community' >> /etc/apk/repositories && \
apk add --update --no-cache \
findutils \
skopeo \
reg \
skopeo@community \
reg@testing \
;
COPY --chown=root:root backup /usr/local/bin/backup
COPY --chown=root:root restore /usr/local/bin/restore
# Backup and restore
## Backup
Backups are done on the host01 machine and are scheduled via GitLab CI/CD.
They're stored under `/var/backups/registry`.
## Restore
Because uploads are only allowed from the machine that hosts the registry
(ns4), the restore also needs to done there. So first step is copying the
backup directory to ns4 (`scp -r host01.shore.co.il:/var/backups/registry ns4.shore.co.il:/home/nimrod/` should do the trick). Afterwards build the image
on the host (`docker --context ns4 build -t reg-backup .`) and run the restore
script with the directory mounted as a volume (`docker --context ns4 run --rm -v /home/nimrod/registry/:/registry:ro reg-backup restore /registry registry.shore.co.il`).
---
version: '3.7'
services:
registry:
environment:
......