1
0
mirror of https://git.tuxpa.in/a/code-server.git synced 2024-12-26 20:25:25 +00:00
code-server-2/ci/dev/image/run.sh
2020-10-07 16:16:01 -04:00

32 lines
514 B
Bash
Executable File

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