Skip to content

Commit

Permalink
Revert "Allow backup to be run as non-root user (#366)" (#370)
Browse files Browse the repository at this point in the history
This reverts commit f64aaa6.
  • Loading branch information
m90 authored Feb 21, 2024
1 parent 02ba993 commit 4b3ca2e
Show file tree
Hide file tree
Showing 11 changed files with 6 additions and 131 deletions.
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

0 comments on commit 4b3ca2e

Please sign in to comment.