Compare commits
10 commits
3a5cef10ed
...
ea563b90c6
Author | SHA1 | Date | |
---|---|---|---|
|
ea563b90c6 | ||
|
6fd377f848 | ||
|
32b83d3811 | ||
|
84450546ce | ||
|
a8373ca11a | ||
|
7eed540985 | ||
|
5015a35ef8 | ||
|
0aaa3d2ff3 | ||
|
6f0ffb7a23 | ||
|
3a2e9816e4 |
6 changed files with 74 additions and 6 deletions
|
@ -24,6 +24,7 @@ table_meta*
|
|||
/*.pdf
|
||||
|
||||
.gitignore
|
||||
.bash_history
|
||||
|
||||
node_modules
|
||||
local
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
image: docker:20.10.16
|
||||
image: docker:latest
|
||||
|
||||
variables:
|
||||
IMAGE_TAG: $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG
|
||||
|
@ -9,7 +9,7 @@ stages:
|
|||
- release
|
||||
|
||||
services:
|
||||
- docker:20.10.16-dind
|
||||
- docker:dind
|
||||
|
||||
build:
|
||||
stage: build
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
FROM node:18-bullseye
|
||||
FROM node:22-bookworm
|
||||
|
||||
ARG SRV_UID="1000"
|
||||
ARG SRV_GID="100"
|
||||
ARG SRV_GID="1000"
|
||||
ARG SRV_VERSION="0"
|
||||
|
||||
ENV SRV_UID $SRV_UID
|
||||
|
@ -14,6 +14,8 @@ RUN apt-get update -y && apt-get install -y jq $SRV_APT_GET_INSTALL \
|
|||
|
||||
RUN id $SRV_UID || useradd -s /bin/bash -d /app -u $SRV_UID -g $SRV_GID srv
|
||||
|
||||
RUN npm install -g ember-cli@5.10.0 @angular/cli@18.1.2 npm@10.8.2
|
||||
|
||||
COPY ./docker-entrypoint.sh /docker-entrypoint.sh
|
||||
|
||||
USER $SRV_UID:$SRV_GID
|
||||
|
|
30
README.md
30
README.md
|
@ -1,5 +1,31 @@
|
|||
# Alias for bash
|
||||
# Node Image
|
||||
|
||||
## How To Use
|
||||
|
||||
### Args
|
||||
|
||||
#### SRV_UID
|
||||
|
||||
User ID for the MinIO daemon and so of the data (Default: 1000)
|
||||
|
||||
#### SRV_GID
|
||||
|
||||
Group ID for the MinIO daemon and so of the data (Default: 1000)
|
||||
|
||||
#### SRV_APT_GET_INSTALL
|
||||
|
||||
Additional Debian modules installed
|
||||
|
||||
### Image Name
|
||||
|
||||
```
|
||||
src.ci/srv/node:latest
|
||||
```
|
||||
|
||||
### Alias for bash
|
||||
|
||||
```shell
|
||||
alias srvnode='docker run --rm -it -v $(pwd):/app docker.ci/srv/node:latest'
|
||||
alias srvnode='docker run --rm -it -v $(pwd):/app src.ci/srv/node:latest'
|
||||
```
|
||||
|
||||
Alternative you can use the included `srvnode` command in the `ex` directory
|
||||
|
|
|
@ -2,6 +2,17 @@
|
|||
|
||||
export IP=$( hostname -i )
|
||||
|
||||
cat <<EOF
|
||||
__ _
|
||||
___ _ ____ __ / / _ __ ___ __| | ___
|
||||
/ __| '__\ \ / / / / | '_ \ / _ \ / _\` |/ _ \\
|
||||
\__ \ | \ V / / / | | | | (_) | (_| | __/
|
||||
|___/_| \_/ /_/ |_| |_|\___/ \__,_|\___|
|
||||
------------------------------------------------
|
||||
IP: $IP
|
||||
|
||||
EOF
|
||||
|
||||
if [[ ! -d "node_modules" ]]; then
|
||||
echo "node_modules does not exist."
|
||||
if [[ -f "package.json" ]]; then
|
||||
|
|
28
ex/srvnode
Executable file
28
ex/srvnode
Executable file
|
@ -0,0 +1,28 @@
|
|||
#!/bin/bash
|
||||
|
||||
DOCKER_RUN_CMD="docker run --rm -it"
|
||||
|
||||
VOLUMES="-v $(pwd):/app"
|
||||
|
||||
if [[ -f "$HOME/.gitconfig" ]]
|
||||
then
|
||||
VOLUMES="$VOLUMES -v $HOME/.gitconfig:/home/node/.gitconfig"
|
||||
fi
|
||||
|
||||
if [[ -d "$HOME/.ssh" ]]
|
||||
then
|
||||
VOLUMES="$VOLUMES -v $HOME/.ssh:/home/node/.ssh"
|
||||
fi
|
||||
|
||||
DOCKER_RUN_CMD="$DOCKER_RUN_CMD $VOLUMES docker.ci/srv/node:latest"
|
||||
|
||||
shift
|
||||
|
||||
if [[ -z "$@" ]]
|
||||
then
|
||||
echo Executing: $DOCKER_RUN_CMD bash
|
||||
exec $DOCKER_RUN_CMD bash
|
||||
else
|
||||
echo Executing: $DOCKER_RUN_CMD $@
|
||||
exec $DOCKER_RUN_CMD $@
|
||||
fi
|
Loading…
Add table
Add a link
Reference in a new issue