author | Edouard Tisserant <edouard.tisserant@gmail.com> |
Sat, 16 Dec 2017 17:28:22 +0100 | |
changeset 33 | 12390414aed0 |
child 37 | fd09116d3537 |
permissions | -rwxr-xr-x |
33
12390414aed0
added helper scripts to use docker build
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
1 |
#!/bin/bash |
12390414aed0
added helper scripts to use docker build
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
2 |
|
12390414aed0
added helper scripts to use docker build
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
3 |
# this script is given as an exemple |
12390414aed0
added helper scripts to use docker build
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
4 |
# I use it to prepare a ready-to-build container |
12390414aed0
added helper scripts to use docker build
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
5 |
# and then use that container with enter_docker.sh |
12390414aed0
added helper scripts to use docker build
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
6 |
|
12390414aed0
added helper scripts to use docker build
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
7 |
docker rm current |
12390414aed0
added helper scripts to use docker build
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
8 |
docker rmi beremiz_builder |
12390414aed0
added helper scripts to use docker build
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
9 |
docker build --build-arg UID=$(id -u) --build-arg GID=$(id -g) -t beremiz_builder . |
12390414aed0
added helper scripts to use docker build
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
10 |
docker create \ |
12390414aed0
added helper scripts to use docker build
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
11 |
--name current \ |
12390414aed0
added helper scripts to use docker build
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
12 |
-v ~/src:/home/devel/src \ |
12390414aed0
added helper scripts to use docker build
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
13 |
-v ~/build/:/home/devel/build \ |
12390414aed0
added helper scripts to use docker build
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
14 |
-v ~/.bash_history:/home/devel/.bash_history \ |
12390414aed0
added helper scripts to use docker build
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
15 |
-w /home/devel/build \ |
12390414aed0
added helper scripts to use docker build
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
16 |
-i -t beremiz_builder /bin/bash |