First commit of the node docker image after move out of core
This commit is contained in:
commit
9ffd5c63d3
4 changed files with 124 additions and 0 deletions
38
.dockerignore
Normal file
38
.dockerignore
Normal file
|
@ -0,0 +1,38 @@
|
||||||
|
SciTEDirectory.properties
|
||||||
|
*/SciTEDirectory.properties
|
||||||
|
*~
|
||||||
|
*.sql
|
||||||
|
*.sql.gz
|
||||||
|
*.zip
|
||||||
|
*.log
|
||||||
|
*.dmp
|
||||||
|
nytprof*
|
||||||
|
sublime_*
|
||||||
|
*.sublime-*
|
||||||
|
~*
|
||||||
|
*~
|
||||||
|
*_
|
||||||
|
_*
|
||||||
|
*/.DS_Store
|
||||||
|
.DS_Store
|
||||||
|
table_meta*
|
||||||
|
*#
|
||||||
|
/*.db
|
||||||
|
/*.xls
|
||||||
|
/*.xlsx
|
||||||
|
/*.csv
|
||||||
|
/*.pdf
|
||||||
|
|
||||||
|
.gitignore
|
||||||
|
|
||||||
|
node_modules
|
||||||
|
local
|
||||||
|
tmp
|
||||||
|
.parcel-cache
|
||||||
|
|
||||||
|
.env
|
||||||
|
.mc
|
||||||
|
docker-compose.override.yml
|
||||||
|
.git
|
||||||
|
|
||||||
|
root
|
37
.gitignore
vendored
Normal file
37
.gitignore
vendored
Normal file
|
@ -0,0 +1,37 @@
|
||||||
|
SciTEDirectory.properties
|
||||||
|
*/SciTEDirectory.properties
|
||||||
|
*~
|
||||||
|
*.sql
|
||||||
|
*.sql.gz
|
||||||
|
*.zip
|
||||||
|
*.log
|
||||||
|
*.dmp
|
||||||
|
nytprof*
|
||||||
|
sublime_*
|
||||||
|
*.sublime-*
|
||||||
|
~*
|
||||||
|
*~
|
||||||
|
*_
|
||||||
|
_*
|
||||||
|
*/.DS_Store
|
||||||
|
.DS_Store
|
||||||
|
table_meta*
|
||||||
|
*#
|
||||||
|
/*.db
|
||||||
|
/*.xls
|
||||||
|
/*.xlsx
|
||||||
|
/*.csv
|
||||||
|
/*.pdf
|
||||||
|
|
||||||
|
node_modules
|
||||||
|
local
|
||||||
|
tmp
|
||||||
|
.parcel-cache
|
||||||
|
|
||||||
|
.env
|
||||||
|
.mc
|
||||||
|
docker-compose.override.yml
|
||||||
|
.git
|
||||||
|
|
||||||
|
root
|
||||||
|
dist
|
26
Dockerfile
Normal file
26
Dockerfile
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
FROM node:18-bullseye
|
||||||
|
|
||||||
|
ARG SRV_UID="1000"
|
||||||
|
ARG SRV_GID="100"
|
||||||
|
ARG SRV_VERSION="0"
|
||||||
|
|
||||||
|
ENV SRV_UID $SRV_UID
|
||||||
|
ENV SRV_GID $SRV_GID
|
||||||
|
ENV SRV_VERSION $SRV_VERSION
|
||||||
|
|
||||||
|
RUN apt-get update -y && apt-get install -y jq \
|
||||||
|
&& apt-get clean && rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
RUN id $SRV_UID || useradd -s /bin/bash -d /app -u $SRV_UID -g $SRV_GID srv
|
||||||
|
|
||||||
|
COPY ./docker-entrypoint.sh /docker-entrypoint.sh
|
||||||
|
|
||||||
|
USER $SRV_UID:$SRV_GID
|
||||||
|
|
||||||
|
ENV PATH "/app/node_modules/.bin:$PATH"
|
||||||
|
|
||||||
|
VOLUME /app
|
||||||
|
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
ENTRYPOINT ["/docker-entrypoint.sh"]
|
23
docker-entrypoint.sh
Executable file
23
docker-entrypoint.sh
Executable file
|
@ -0,0 +1,23 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
IP=$( hostname -i )
|
||||||
|
|
||||||
|
if [[ -z "$@" ]]
|
||||||
|
then
|
||||||
|
if [[ -f "package.json" ]]
|
||||||
|
then
|
||||||
|
PACKAGE_JSON_START=$( cat package.json | jq -r '.scripts.start // empty' )
|
||||||
|
if [[ -z "$PACKAGE_JSON_START" ]]
|
||||||
|
then
|
||||||
|
echo "package.json found, but no start script, starting bash..."
|
||||||
|
exec bash
|
||||||
|
else
|
||||||
|
exec $PACKAGE_JSON_START
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
echo "No package.json found, starting bash..."
|
||||||
|
exec bash
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
exec $@
|
||||||
|
fi
|
Loading…
Add table
Add a link
Reference in a new issue