-
Notifications
You must be signed in to change notification settings - Fork 462
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use permset to ensure /unifi is owned by the user specified in docker…
… run command line see #525
- Loading branch information
1 parent
13fb3fa
commit 0baa642
Showing
2 changed files
with
15 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,9 @@ | ||
FROM golang:1.17-bullseye as permset | ||
WORKDIR /src | ||
RUN git clone https://github.com/jacobalberty/permset.git /src && \ | ||
mkdir -p /out && \ | ||
go build -ldflags "-X main.chownDir=/unifi" -o /out/permset | ||
|
||
FROM ubuntu:18.04 | ||
|
||
LABEL maintainer="Jacob Alberty <[email protected]>" | ||
|
@@ -55,6 +61,10 @@ RUN set -ex \ | |
&& useradd --no-log-init -r -u $UNIFI_UID -g $UNIFI_GID unifi \ | ||
&& /usr/local/bin/docker-build.sh "${PKGURL}" | ||
|
||
COPY --from=permset /out/permset /usr/local/bin/permset | ||
RUN chown 0.0 /usr/local/bin/permset && \ | ||
chmod +s /usr/local/bin/permset | ||
|
||
RUN mkdir -p /unifi && chown unifi:unifi -R /unifi | ||
|
||
# Apply any hotfixes that were included | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters