-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-native
More file actions
executable file
·36 lines (31 loc) · 1.19 KB
/
docker-native
File metadata and controls
executable file
·36 lines (31 loc) · 1.19 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/bin/bash
uid="$(id -u)"
gid="$(id -g)"
dir="$(pwd)"
set -e
mkdir --parents ~/.conan/data
if [[ ! -e "${HOME}/.conan/.conan.db" ]] ; then
echo "Conan database (~/.conan/.conan.db) does not exist. Please initialize Conan for your host system first."
exit 1
fi
if [[ ! -e "${HOME}/.conan/remotes.json" ]] ; then
if [[ -e "${HOME}/.conan/registry.json" ]] ; then
echo "This version of the Docker image contains a different version of Conan than your most recently used version. Please use your host-installed version of Conan to migrate and then try again."
else
echo "Conan database (~/.conan/remotes) does not exist. Please initialize Conan for your host system first."
fi
exit 1
fi
set -x
docker run -it --rm \
--net=host \
-e uid="${uid}" \
-e gid="${gid}" \
-v "${HOME}/.ssh/id_rsa:/home/captain/.ssh/id_rsa" \
-v "${HOME}/.ssh/known_hosts:/home/captain/.ssh/known_hosts" \
-v "${HOME}/.conan/data:/home/captain/.conan/data" \
-v "${HOME}/.conan/remotes.json:/home/captain/.conan/remotes.json" \
-v "${HOME}/.conan/.conan.db:/home/captain/.conan/.conan.db" \
-v "${dir}:${dir}" \
-w "${dir}" \
wsbu/toolchain-native:v0.3.10 "$@"