docker client is building

This commit is contained in:
2020-06-03 11:52:04 +02:00
parent 1cbc7ddd71
commit 128800cb3f
8 changed files with 48 additions and 37 deletions
+30
View File
@@ -0,0 +1,30 @@
FROM node:lts-alpine
RUN apk update && apk --no-cache add shadow && \
usermod -u 1001 node && \
groupmod -g 1001 node
RUN find / -group 1000 -exec chgrp -h node {} \;
RUN find / -user 1000 -exec chown -h node {} \;
ARG USER_UID
ARG USER_UNAME
ARG USER_GID
ARG USER_GNAME
# RUN addgroup -g 1000 gdp && \
# adduser -h /home/gdp -D -u 1000 gdp && \
RUN adduser -u ${USER_UID} -G users -s /bin/sh -D ${USER_UNAME}
# chown -R gdp:gdp /home/gdp
USER ${USER_UNAME}
COPY ./bashrc /home/${USER_UNAME}/.bashrc
COPY ./inputrc /home/${USER_UNAME}/.inputrc
COPY ./client-entrypoint.sh /usr/local/bin
USER root
RUN chmod +x /usr/local/bin/client-entrypoint.sh
USER ${USER_UNAME}
CMD ["/bin/sh","/usr/local/bin/client-entrypoint.sh"]
-31
View File
@@ -1,31 +0,0 @@
FROM node:lts-alpine
# RUN apk update && apk --no-cache add shadow && \
# usermod -u 1001 node && \
# groupmod -g 1001 node
# RUN find / -group 1000 -exec chgrp -h node {} \;
# RUN find / -user 1000 -exec chown -h node {} \;
ARG USER_UID
ARG USER_UNAME
ARG USER_GID
ARG USER_GNAME
RUN if getent group ${USER_GNAME} ; then groupdel ${USER_GNAME}; fi &&\
groupadd -g ${USER_GID} ${USER_GNAME} &&\
useradd -l -u ${USER_UID} -g ${USER_GNAME} ${USER_UNAME} &&\
install -d -m 0755 -o ${USER_UNAME} -g ${USER_GNAME} /home/${USER_UNAME} &&\
chown --changes --silent --no-dereference --recursive \
--from=33:33 ${USER_UID}:${USER_GID} \
/home/${USER_UNAME}
COPY ./bashrc /home/${USER_UNAME}/.bashrc
COPY ./inputrc /home/${USER_UNAME}/.inputrc
USER root
COPY ./client-entrypoint.sh /usr/local/bin
RUN chmod +x /usr/local/bin/client-entrypoint.sh
USER ${USER_UNAME}
CMD ["/bin/sh","/usr/local/bin/client-entrypoint.sh"]
+6 -2
View File
@@ -33,8 +33,12 @@ logs:
down:
docker-compose down
# exec_php:
# docker exec -it materiod8_php_1 bash
restart_client:
docker-compose restart client
exec_client:
docker exec -it muntadas_client_1 bash
#
# exec_mysql:
# docker exec -it materiod8_mysql_1 bash
+1 -1
Submodule app updated: 574cf945f4...15abfa3507
+11 -3
View File
@@ -1,7 +1,15 @@
version: "3.5"
services:
client:
build: ./Docker/app
volumes:
- "${CLIENT_ROOT}:/app"
# - client-home:/home/gdp
ports:
- 8788:8988
working_dir: "/app"
volumes:
networks:
# volumes:
#
# networks: