Skip to content

Commit c93bf3f

Browse files
committed
preserve env for startup command
1 parent 0f8d764 commit c93bf3f

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ COPY config/www-data_startupservice /etc/sudoers.d/www-data_startupservice
4848
# Add Apache2 service startup script
4949
COPY config/startupservice.sh /startupservice.sh
5050
RUN chmod +x /startupservice.sh
51-
CMD ["sudo", "/startupservice.sh"]
51+
CMD ["sudo", "--preserve-env", "/startupservice.sh"]
5252

5353

5454
# Expose ports for Apache

config/www-data_startupservice

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
#
33
# This file MUST be edited with `/usr/sbin/visudo -sf FILENAME`.
44

5-
%sudo ALL = NOPASSWD: /startupservice.sh
5+
%sudo ALL = NOPASSWD:SETENV: /startupservice.sh

0 commit comments

Comments
 (0)