Skip to content

Commit 0310f5b

Browse files
committed
Converting from /build-mount -> /build, adding /code mount
1 parent b7e505e commit 0310f5b

File tree

13 files changed

+41
-15
lines changed

13 files changed

+41
-15
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ TODO: There appears to be an issue connecting on the exposed port
4343
cd build && ./all.sh
4444
~~~
4545

46-
This builds the API and puts binary artifacts into the build-mount volume.
46+
This builds the API and puts binary artifacts into the build volume.
4747

4848
4. Test the containers
4949

build/all.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/usr/bin/env bash
22

33
# Clones the git repo, makes the build container, builds the API and copies the
4-
# artifacts to the build-mount volume
4+
# artifacts to the build volume
55
./clone.sh && ./make-container.sh && ./build-copy.sh

build/api-copy.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
#!/usr/bin/env bash
2-
echo "Copying built artifacts into /build-mount"
2+
echo "Copying built artifacts into /build"
33
ls /s2client-api/s2client-api-*
4-
cp /s2client-api/s2client-api-* /build-mount/
4+
cp /s2client-api/s2client-api-* /build/

build/build-copy.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@
33
SCRIPT_PATH=${0%/*}
44
. ${SCRIPT_PATH}/../config.sh
55

6-
# Build the API artifacts in the build-mount folder
7-
docker run -it -v build-mount:/build-mount --entrypoint="/s2client-api/api-all.sh" s2client-api
6+
# Build the API artifacts in the build folder
7+
docker run -it -v build:/build --entrypoint="/s2client-api/api-all.sh" s2client-api

dev/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ RUN git config --global user.email "$GIT_EMAIL"
4242
# Generate a new SSH key pair without user input
4343
RUN cat /dev/zero | ssh-keygen -q -N "" > /dev/null
4444

45-
# Add the code
45+
# Set the starting directory
4646
WORKDIR /home/$SYSTEM_USER_NAME
4747

4848
# Override the s2client-game entrypoint

dev/make-container.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ docker build ${SCRIPT_PATH} \
1919
--build-arg GIT_EMAIL="${GIT_EMAIL}" \
2020
-t ${IMAGE_NAME}
2121

22+
echo ==== Code mount created at /code in the container
2223
echo ==== Your github.com SSH public key for the container is:
2324

2425
# Output the key for usage on github.com

dev/run-dev.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#!/usr/bin/env bash
22

33
docker run \
4-
-v build-mount:/build-mount \
4+
-v code:/code \
5+
-v build:/build \
56
-it s2client-dev

dev/run-user.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,6 @@
22

33
# This runs the user dev container
44
docker run \
5-
-v build-mount:/build-mount \
5+
-v code:/code \
6+
-v build:/build \
67
-it s2client-`whoami`

game/download.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,15 @@ mkdir -p downloads/
1212

1313
pushd downloads
1414

15+
# Just clone the base repository for the maps
16+
if [ ! -d s2client-api ]; then
17+
git clone [email protected]:Blizzard/s2client-api.git
18+
else
19+
pushd s2client-api
20+
git pull -r
21+
popd
22+
fi
23+
1524
${WGET_CMD} http://blzdistsc2-a.akamaihd.net/Linux/SC2.${GAME_VERSION}.zip
1625
${WGET_CMD} http://blzdistsc2-a.akamaihd.net/MapPacks/Ladder2017Season1.zip
1726
${WGET_CMD} http://blzdistsc2-a.akamaihd.net/MapPacks/Ladder2017Season2.zip

game/run-interactive.sh

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
#!/usr/bin/env bash
22

3-
# Run an interactive container with the build-mount (see build/all.sh)
4-
docker run --entrypoint="/bin/bash" -v build-mount:/build-mount -it s2client-game
3+
# Run an interactive container with the build (see build/all.sh)
4+
docker run \
5+
--entrypoint="/bin/bash" \
6+
-v code:/code
7+
-v build:/build
8+
-it s2client-game

0 commit comments

Comments
 (0)