edited Dockerfile

This commit is contained in:
CodeServer 2022-05-08 03:57:23 +01:00
parent 837bcbe4a9
commit e1120f24f9
2 changed files with 32 additions and 1 deletions

View File

@ -6,4 +6,6 @@ COPY ["package.json", "package-lock.json*", "./"]
COPY . .
ENV GENERATE_SOURCEMAP false
RUN npm install
CMD [ "npm", "run", "start-prod" ]
RUN chmod +x run
CMD ["/DockerRegistryWebUI/run"]
#CMD [ "npm", "run", "start-prod" ]

29
run Normal file
View File

@ -0,0 +1,29 @@
#!/usr/bin/env bash
#
set -o nounset \
-o errexit \
-o verbose \
-o xtrace
# Set environment values if they exist as arguments
if [ $# -ne 0 ]; then
echo "===> Overriding env params with args ..."
for var in "$@"
do
export "$var"
done
fi
echo "===> ENV Variables ..."
env | sort
echo "===> User"
id
echo "===> Building ..."
npm run build --production
echo "===> Running ... "
exec npm run start-prod