Archived
1
0
This repository has been archived on 2024-09-09. You can view files and clone it, but cannot push or open issues or pull requests.
code-server/ci/dev/image/run.sh

30 lines
476 B
Bash
Raw Normal View History

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