Skip to content

Commit

Permalink
Merge pull request #3641 from wkloucek/docker_narrow_volume_permissions
Browse files Browse the repository at this point in the history
reduce docker image volume permissions and update alpine
  • Loading branch information
wkloucek authored May 3, 2022
2 parents a29d202 + 1e6b2fe commit 36a8fba
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 9 deletions.
9 changes: 9 additions & 0 deletions changelog/unreleased/change-ocis-docker-volume-permissions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Change: Reduce permissions on docker image predeclared volumes

We've lowered the permissions on the predeclared volumes of the oCIS
docker image from 777 to 750.

This change doesn't affect you, unless you use the docker image with
the non default uid/guid to start oCIS (default is 1000:1000).

https://github.com/owncloud/ocis/pull/3641
6 changes: 3 additions & 3 deletions ocis/docker/Dockerfile.linux.amd64
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM amd64/alpine:3.14
FROM amd64/alpine:3.15

ARG VERSION=""
ARG REVISION=""
Expand Down Expand Up @@ -26,10 +26,10 @@ RUN addgroup -g 1000 -S ocis-group && \

RUN mkdir -p /var/lib/ocis && \
chown -R ocis-user:ocis-group /var/lib/ocis && \
chmod -R 777 /var/lib/ocis && \
chmod -R 750 /var/lib/ocis && \
mkdir -p /etc/ocis && \
chown -R ocis-user:ocis-group /etc/ocis && \
chmod -R 777 /etc/ocis
chmod -R 750 /etc/ocis

VOLUME [ "/var/lib/ocis", "/etc/ocis" ]
WORKDIR /var/lib/ocis
Expand Down
6 changes: 3 additions & 3 deletions ocis/docker/Dockerfile.linux.arm
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM arm32v6/alpine:3.14
FROM arm32v6/alpine:3.15

ARG VERSION=""
ARG REVISION=""
Expand Down Expand Up @@ -26,10 +26,10 @@ RUN addgroup -g 1000 -S ocis-group && \

RUN mkdir -p /var/lib/ocis && \
chown -R ocis-user:ocis-group /var/lib/ocis && \
chmod -R 777 /var/lib/ocis && \
chmod -R 750 /var/lib/ocis && \
mkdir -p /etc/ocis && \
chown -R ocis-user:ocis-group /etc/ocis && \
chmod -R 777 /etc/ocis
chmod -R 750 /etc/ocis

VOLUME [ "/var/lib/ocis", "/etc/ocis" ]
WORKDIR /var/lib/ocis
Expand Down
6 changes: 3 additions & 3 deletions ocis/docker/Dockerfile.linux.arm64
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM arm64v8/alpine:3.14
FROM arm64v8/alpine:3.15

ARG VERSION=""
ARG REVISION=""
Expand Down Expand Up @@ -26,10 +26,10 @@ RUN addgroup -g 1000 -S ocis-group && \

RUN mkdir -p /var/lib/ocis && \
chown -R ocis-user:ocis-group /var/lib/ocis && \
chmod -R 777 /var/lib/ocis && \
chmod -R 750 /var/lib/ocis && \
mkdir -p /etc/ocis && \
chown -R ocis-user:ocis-group /etc/ocis && \
chmod -R 777 /etc/ocis
chmod -R 750 /etc/ocis

VOLUME [ "/var/lib/ocis", "/etc/ocis" ]
WORKDIR /var/lib/ocis
Expand Down

0 comments on commit 36a8fba

Please sign in to comment.