File tree Expand file tree Collapse file tree 2 files changed +21
-2
lines changed Expand file tree Collapse file tree 2 files changed +21
-2
lines changed Original file line number Diff line number Diff line change @@ -30,7 +30,11 @@ RUN mkdir -p /run/sshd
3030
3131# Expose SSH port
3232EXPOSE 22
33+ EXPOSE 3306
3334
34- # Start SSH service
35- CMD ["/usr/sbin/sshd" , "-D" ]
35+ # Add mariadb service startup script
36+ COPY ./db/startupservice.sh /startupservice.sh
37+ RUN chmod +x /startupservice.sh
3638
39+ ENTRYPOINT ["/startupservice.sh" ]
40+ CMD ["mariadbd" ]
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+ set -o errexit
3+ set -o nounset
4+
5+ # https://en.wikipedia.org/wiki/ANSI_escape_code
6+ E0=" $( printf " \e[0m" ) " # reset
7+ E1=" $( printf " \e[1m" ) " # bold
8+
9+ echo " ${E1} Starting mariadb: http://127.0.0.1:3306${E0} "
10+
11+ # Start mariadb in the background
12+ docker-entrypoint.sh " $@ "
13+
14+ # Start SSH service
15+ /usr/sbin/sshd -D
You can’t perform that action at this time.
0 commit comments