mirror of
https://github.com/coder/code-server.git
synced 2024-12-04 23:03:06 +08:00
607444c695
We only want to use an old version for glibc which the centos:7 image takes care of. The old version of git used in debian:8 was causing problems with the uid/gid passthrough with no user in passwd.
29 lines
454 B
Bash
Executable File
29 lines
454 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" \
|
|
-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 "$@"
|