replaced node:lts-alpine by node:lts-bullseye
This commit is contained in:
+28
-19
@@ -1,30 +1,39 @@
|
||||
FROM node:lts-alpine
|
||||
FROM node:lts-bullseye
|
||||
|
||||
RUN apk update && apk --no-cache add shadow && \
|
||||
usermod -u 1001 node && \
|
||||
groupmod -g 1001 node
|
||||
# THE ALL USER THINGS IS USELESS AS NODE IS ALREADY A USER @ 1000
|
||||
|
||||
RUN find / -group 1000 -exec chgrp -h node {} \;
|
||||
RUN find / -user 1000 -exec chown -h 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
|
||||
# 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
|
||||
# # 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}
|
||||
# RUN if getent group ${USER_GNAME} ; then groupdel ${USER_GNAME}; fi
|
||||
# RUN groupadd -g ${USER_GID} ${USER_GNAME}
|
||||
# RUN useradd -l -u ${USER_UID} -g ${USER_GNAME} ${USER_UNAME}
|
||||
# RUN install -d -m 0755 -o ${USER_UNAME} -g ${USER_GNAME} /home/${USER_UNAME}
|
||||
# RUN 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 ${USER_UNAME}
|
||||
|
||||
# COPY ./bashrc /home/${USER_UNAME}/.bashrc
|
||||
# COPY ./inputrc /home/${USER_UNAME}/.inputrc
|
||||
|
||||
# COPY ./bashrc /home/node/.bashrc # should do an echo in already existing /home/node/.bashcr
|
||||
COPY ./inputrc /home/node/.inputrc
|
||||
|
||||
COPY ./client-entrypoint.sh /usr/local/bin
|
||||
USER root
|
||||
# USER root
|
||||
RUN chmod +x /usr/local/bin/client-entrypoint.sh
|
||||
USER ${USER_UNAME}
|
||||
# USER ${USER_UNAME}
|
||||
CMD ["/bin/sh","/usr/local/bin/client-entrypoint.sh"]
|
||||
|
||||
@@ -22,7 +22,7 @@ echo "APP_ENV $APP_ENV"
|
||||
|
||||
if [ "$APP_ENV" = "prod" ]; then
|
||||
echo "Run npm prod"
|
||||
npm run prod
|
||||
npm run build
|
||||
else
|
||||
echo "Run npm dev"
|
||||
npm run dev
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
upstream app{
|
||||
server app:8988;
|
||||
server app:5173;
|
||||
}
|
||||
|
||||
server {
|
||||
|
||||
@@ -21,6 +21,9 @@ build:
|
||||
buildnc:
|
||||
docker-compose build --no-cache --build-arg USER_UID=$(USER_UID) --build-arg USER_UNAME=$(USER_UNAME) --build-arg USER_GID=$(USER_GID) --build-arg USER_GNAME=$(USER_GNAME)
|
||||
|
||||
buildncapp:
|
||||
docker-compose build --no-cache --build-arg USER_UID=$(USER_UID) --build-arg USER_UNAME=$(USER_UNAME) --build-arg USER_GID=$(USER_GID) --build-arg USER_GNAME=$(USER_GNAME) app
|
||||
|
||||
downbuildup: down build up
|
||||
|
||||
up:
|
||||
@@ -56,7 +59,7 @@ exec_api:
|
||||
docker exec -it ouatterrir-api-1 bash
|
||||
|
||||
exec_app:
|
||||
docker exec -it ouatterrir-app-1 sh
|
||||
docker exec -it ouatterrir-app-1 bash
|
||||
|
||||
restart_app:
|
||||
docker-compose restart app
|
||||
|
||||
+1
-1
Submodule app updated: 3149c92f11...1a7ecfad8f
+2
-1
@@ -71,10 +71,11 @@ services:
|
||||
- app
|
||||
- server
|
||||
ports:
|
||||
- 8988:8988
|
||||
- 5173:5173
|
||||
working_dir: "/app"
|
||||
environment:
|
||||
- APP_ENV=dev
|
||||
tty: true
|
||||
|
||||
nginx:
|
||||
build: ./Docker/nginx/
|
||||
|
||||
Reference in New Issue
Block a user