Skip to content

Commit 26aae56

Browse files
committed
Update deb dockerfile and entrypoint like PR shenxn#69 from upstream
1 parent 44fbc26 commit 26aae56

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

deb/Dockerfile

+7
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,11 @@ COPY gpgparams install.sh entrypoint.sh VERSION /protonmail/
1212
# Install dependencies and protonmail bridge
1313
RUN bash install.sh
1414

15+
# Add a user 'protonmail' with UID 8535
16+
RUN useradd -u 8535 -d /home/protonmail protonmail \
17+
&& mkdir -p /home/protonmail \
18+
&& chown protonmail: /home/protonmail
19+
# change to non-privileged user for extra security
20+
USER protonmail
21+
1522
ENTRYPOINT ["bash", "/protonmail/entrypoint.sh"]

deb/entrypoint.sh

+4
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
set -ex
44

5+
# Go to current user's homedir
6+
cd
7+
echo "Running as user '$USER' (UID '$UID') in '$PWD'"
8+
59
# Initialize
610
if [[ $1 == init ]]; then
711

0 commit comments

Comments
 (0)