Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Martin Koehler
rdmo-docker-compose
Commits
1af007ec
Commit
1af007ec
authored
Nov 13, 2019
by
Olaf Michaelis
Browse files
Improve makefile
parent
395b59de
Changes
3
Hide whitespace changes
Inline
Side-by-side
apache/dockerfile_master
View file @
1af007ec
...
...
@@ -27,7 +27,7 @@ COPY ./vhosts.conf "${HTTPD_VHOSTS}"
COPY ./drun.sh /drun.sh
COPY ./healthcheck.sh /healthcheck.sh
RUN useradd -m -u $UID -s /bin/bash rdmo
RUN useradd -m -u $
{
UID
}
-s /bin/bash rdmo
RUN mkdir -p /var/www/html
RUN mkdir -p /var/run/apache2
...
...
makefile
View file @
1af007ec
...
...
@@ -8,6 +8,7 @@ RESTART_POLICY=$(shell cat ${CURDIR}/${VARS_ENV} | grep -Po "(?<=RESTART_POLICY=
DOCKER_IN_GROUPS
=
$(
shell
groups
|
grep
"docker"
)
MYID
=
$(
shell
id
-u
)
ifeq
($(strip $(DOCKER_IN_GROUPS)),)
DC_CMD
=
sudo
docker-compose
else
...
...
@@ -15,11 +16,19 @@ else
endif
all
:
preparations run_build tail_logs
preps
:
preparations
build
:
preparations run_build
fromscratch
:
preparations run_remove run_build
remove
:
run_remove
all
:
root_check preparations run_build tail_logs
preps
:
root_check preparations
build
:
root_check preparations run_build
restart
:
run_restart
fromscratch
:
root_check preparations run_remove run_build
remove
:
root_check run_remove
root_check
:
@
if
[
"
${MYID}
"
=
"0"
]
;
then
\
echo
Please
do
not run as root. It is neither recommended nor would it work.
;
\
fi
@
exit
preparations
:
mkdir
-p
${CURDIR}
/vol/log
...
...
@@ -50,5 +59,8 @@ run_remove:
$(DC_CMD)
down
--rmi
all
$(DC_CMD)
rm
--force
run_restart
:
$(DC_CMD)
restart
tail_logs
:
$(DC_CMD)
logs
-f
rdmo/dockerfile_master
View file @
1af007ec
...
...
@@ -32,7 +32,7 @@ COPY ./rootfs /
RUN chmod -R 777 /tmp
RUN useradd -m -u $UID -s /bin/bash rdmo
RUN useradd -m -u $
{
UID
}
-s /bin/bash rdmo
USER rdmo
CMD ["/drun.sh"]
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment