1
0
mirror of https://github.com/coder/code-server.git synced 2024-12-05 07:13:06 +08:00
code-server/ci/dev/image/run.sh

29 lines
454 B
Bash
Raw Normal View History

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