Skip to content

Commit 0f90c56

Browse files
committed
Added customization script
1 parent c35585b commit 0f90c56

File tree

3 files changed

+13
-3
lines changed

3 files changed

+13
-3
lines changed

docker/main/Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ COPY bin/* /opt/docker/
1212
ADD entrypoint.sh /entrypoint.sh
1313

1414
RUN bash /opt/docker/install.sh
15+
RUN bash /opt/docker/customization.sh
1516

1617
EXPOSE 9000
1718

docker/main/bin/customization.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/usr/bin/env bash
2+
3+
set -o pipefail # trace ERR through pipes
4+
set -o errtrace # trace ERR through 'time command' and other functions
5+
set -o nounset ## set -u : exit the script if you try to use an uninitialised variable
6+
set -o errexit ## set -e : exit the script if any statement returns a non-true return value
7+
8+
export DEBIAN_FRONTEND="noninteractive"
9+
10+
## add your custom stuff here

docker/main/bin/install.sh

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,8 @@ export DEBIAN_FRONTEND="noninteractive"
1111
# Modify user
1212
#############################
1313

14-
usermod --uid 1000 --shell /bin/bash --home /home www-data
15-
groupmod --gid 1000 www-data
16-
chown www-data:www-data /home
14+
usermod --shell /bin/bash --home /home www-data
15+
chown www-data:www-data /home
1716

1817
## Fix terminal
1918
echo 'export TERM="xterm-color"' >> /root/.bashrc

0 commit comments

Comments
 (0)