Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
brainfood
/
astro-oidc-middleware
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
52c693a0
authored
2024-05-02 13:28:19 -0500
by
Adam Heath
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Add a script to run node in a docker container.
1 parent
7a98d14a
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
33 additions
and
0 deletions
bin/run
container-entrypoint.sh
bin/run
0 → 100755
View file @
52c693a
#!/bin/sh
set
-e
TOP_DIR
=
"
$(
cd
"
$(
dirname
"
$0
"
)
/.."
;
pwd
-P
)
"
ti_arg
=
""
if
[
-t 0
]
;
then
ti_arg
=
"-ti"
fi
docker run --rm
$ti_arg
\
-e
UID_REMAP
=
$(
id -u
)
-e
GID_REMAP
=
$(
id -g
)
\
-v
"
$TOP_DIR
/container-entrypoint.sh:/container-entrypoint.sh"
--entrypoint /container-entrypoint.sh
\
-w /srv/app
\
-v
"
$TOP_DIR
:/srv/app"
\
$DOCKER_ARGS
\
node
"
$@
"
container-entrypoint.sh
0 → 100755
View file @
52c693a
#!/bin/bash
set
-e
if
[[
0 -eq
$(
id -u
)
]]
;
then
[[
$UID_REMAP
]]
&&
usermod -u
$UID_REMAP
node
[[
$GID_REMAP
]]
&&
groupmod -g
$GID_REMAP
node
fi
if
[[
$#
-eq 0
]]
;
then
set
-- bash
fi
cmd
=
"
$1
"
shift
start-stop-daemon -c node -d
$PWD
-u node --start --exec
"
$(
which
"
$cmd
"
)
"
--
"
$@
"
Please
register
or
sign in
to post a comment