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

Revert "Allow backup to be run as non-root user" #370

Merged
merged 1 commit into from
Feb 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@ FROM alpine:3.19

WORKDIR /root

RUN apk add --no-cache ca-certificates && \
chmod a+rw /var/lock
RUN apk add --no-cache ca-certificates

COPY --from=builder /app/cmd/backup/backup /usr/bin/backup

Expand Down
2 changes: 1 addition & 1 deletion docs/how-tos/replace-deprecated-backup-from-snapshot.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: Replace deprecated BACKUP_FROM_SNAPSHOT usage
layout: default
parent: How Tos
nav_order: 17
nav_order: 16
---

# Replace deprecated `BACKUP_FROM_SNAPSHOT` usage
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: Replace deprecated BACKUP_STOP_CONTAINER_LABEL setting
layout: default
parent: How Tos
nav_order: 20
nav_order: 19
---

# Replace deprecated `BACKUP_STOP_CONTAINER_LABEL` setting
Expand Down
2 changes: 1 addition & 1 deletion docs/how-tos/replace-deprecated-exec-labels.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: Replace deprecated exec-pre and exec-post labels
layout: default
parent: How Tos
nav_order: 18
nav_order: 17
---

# Replace deprecated `exec-pre` and `exec-post` labels
Expand Down
2 changes: 1 addition & 1 deletion docs/how-tos/update-deprecated-email-config.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: Update deprecated email configuration
layout: default
parent: How Tos
nav_order: 19
nav_order: 18
---

# Update deprecated email configuration
Expand Down
36 changes: 0 additions & 36 deletions docs/how-tos/use-as-non-root.md

This file was deleted.

21 changes: 0 additions & 21 deletions docs/recipes/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -371,24 +371,3 @@ volumes:
data_1:
data_2:
```

## Running as a non-root user

```yml
version: '3'

services:
# ... define other services using the `data` volume here
backup:
image: offen/docker-volume-backup:v2
user: 1000:1000
environment:
AWS_S3_BUCKET_NAME: backup-bucket
AWS_ACCESS_KEY_ID: AKIAIOSFODNN7EXAMPLE
AWS_SECRET_ACCESS_KEY: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
volumes:
- data:/backup/my-app-backup:ro

volumes:
data:
```
7 changes: 0 additions & 7 deletions test/nonroot/01conf.env

This file was deleted.

33 changes: 0 additions & 33 deletions test/nonroot/docker-compose.yml

This file was deleted.

27 changes: 0 additions & 27 deletions test/nonroot/run.sh

This file was deleted.

2 changes: 1 addition & 1 deletion test/util.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ skip () {

expect_running_containers () {
if [ "$(docker ps -q | wc -l)" != "$1" ]; then
fail "Expected $1 containers to be running, instead seen: "$(docker ps -q | wc -l)""
fail "Expected $1 containers to be running, instead seen: "$(docker ps -a | wc -l)""
fi
pass "$1 containers running."
}
Expand Down
Loading