Sha256: 7cd28763ca81f63fe291c968b6e57c8fba2c0fe079b0312e45c4801062e3065c

Contents?: true

Size: 1.38 KB

Versions: 9

Compression:

Stored size: 1.38 KB

Contents

#!/bin/bash
#
# This file is largely cargo-culted from cockroachdb/cockroach/build/builder.sh.

set -euox pipefail

DOCKER_IMAGE_TAG=cockroachdb/activerecord_test_container:20210914

# Absolute path to this repository.
repo_root=$(cd "$(dirname "${0}")" && pwd)

# Make a fake passwd file for the invoking user.
#
# This setup is so that files created from inside the container in a mounted
# volume end up being owned by the invoking user and not by root.
# We'll mount a fresh directory owned by the invoking user as /root inside the
# container because the container needs a $HOME (without one the default is /)
# and because various utilities (e.g. bash writing to .bash_history) need to be
# able to write to there.
username=$(id -un)
uid_gid=$(id -u):$(id -g)
container_root=${repo_root}/docker_root
mkdir -p "${container_root}"/{etc,home,home/"${username}"/activerecord-cockroachdb-adapter,home/.gems}
echo "${username}:x:${uid_gid}::/home/${username}:/bin/bash" > "${container_root}/etc/passwd"

exec docker run \
  --volume="${container_root}/etc/passwd:/etc/passwd" \
  --volume="${container_root}/home/${username}:/home/${username}" \
  --volume="${repo_root}:/home/${username}/activerecord-cockroachdb-adapter" \
  --workdir="/home/${username}/activerecord-cockroachdb-adapter" \
  --env=PIP_USER=1 \
  --env=GEM_HOME="/home/${username}/.gems" \
  --user="${uid_gid}" \
  "${DOCKER_IMAGE_TAG}" \
  "$@"

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
activerecord-cockroachdb-adapter-6.1.11 docker.sh
activerecord-cockroachdb-adapter-7.0.0 docker.sh
activerecord-cockroachdb-adapter-6.1.10 docker.sh
activerecord-cockroachdb-adapter-6.1.9 docker.sh
activerecord-cockroachdb-adapter-6.1.8 docker.sh
activerecord-cockroachdb-adapter-6.1.7 docker.sh
activerecord-cockroachdb-adapter-6.1.6 docker.sh
activerecord-cockroachdb-adapter-6.1.5 docker.sh
activerecord-cockroachdb-adapter-6.1.4 docker.sh