1
0
mirror of https://git.tuxpa.in/a/code-server.git synced 2024-12-27 04:35:25 +00:00
code-server-2/ci/dev/image/run.sh

32 lines
514 B
Bash
Raw Normal View History

#!/usr/bin/env bash
set -euo pipefail
main() {
cd "$(dirname "$0")/../../.."
source ./ci/lib.sh
2020-09-15 14:15:51 +00:00
mkdir -p .home
docker run \
-it \
--rm \
-v "$PWD:/src" \
2020-09-15 14:15:51 +00:00
-e HOME="/src/.home" \
-e USER="coder" \
-e GITHUB_TOKEN \
2020-10-07 17:26:57 +00:00
-e KEEP_MODULES \
-e MINIFY \
-w /src \
-p 127.0.0.1:8080:8080 \
2020-09-03 06:16:57 +00:00
-u "$(id -u):$(id -g)" \
-e CI \
"$(docker_build ./ci/images/"${IMAGE-debian10}")" \
"$@"
}
docker_build() {
docker build "$@" >&2
docker build -q "$@"
}
main "$@"