aboutsummaryrefslogtreecommitdiff
path: root/deployment
diff options
context:
space:
mode:
authorJoshua M. Boniface <joshua@boniface.me>2020-03-23 15:44:23 -0400
committerJoshua M. Boniface <joshua@boniface.me>2020-03-23 15:46:08 -0400
commit8b1a76a32e5c2d8677fc6bba62682cfc1af748e6 (patch)
tree4ae1e7911fd84a091a0da2cca60f245ec5a71f91 /deployment
parent3e7a106a95a183ba4c7d1bf00d87e149463f0e23 (diff)
Mount the source volume rather than copy it
Now that the build script cleans up both before and after building, this is a viable option and will significant reduce build times by promoting container reuse (with `-k`).
Diffstat (limited to 'deployment')
-rw-r--r--deployment/Dockerfile.debian.amd645
-rw-r--r--deployment/Dockerfile.debian.arm645
-rw-r--r--deployment/Dockerfile.debian.armhf5
-rw-r--r--deployment/Dockerfile.ubuntu.amd645
-rw-r--r--deployment/Dockerfile.ubuntu.arm645
-rw-r--r--deployment/Dockerfile.ubuntu.armhf5
6 files changed, 6 insertions, 24 deletions
diff --git a/deployment/Dockerfile.debian.amd64 b/deployment/Dockerfile.debian.amd64
index 47c13fa71..b5a038048 100644
--- a/deployment/Dockerfile.debian.amd64
+++ b/deployment/Dockerfile.debian.amd64
@@ -24,11 +24,8 @@ RUN wget https://download.visualstudio.microsoft.com/download/pr/d731f991-8e68-4
# Link to build script
RUN ln -sf ${SOURCE_DIR}/deployment/build.debian.amd64 /build.sh
-# Create the source dir
-RUN mkdir -p ${SOURCE_DIR}
+VOLUME ${SOURCE_DIR}/
VOLUME ${ARTIFACT_DIR}/
-COPY . ${SOURCE_DIR}/
-
ENTRYPOINT ["/build.sh"]
diff --git a/deployment/Dockerfile.debian.arm64 b/deployment/Dockerfile.debian.arm64
index 7b792d7e1..cfe562df3 100644
--- a/deployment/Dockerfile.debian.arm64
+++ b/deployment/Dockerfile.debian.arm64
@@ -32,11 +32,8 @@ RUN dpkg --add-architecture arm64 \
# Link to build script
RUN ln -sf ${SOURCE_DIR}/deployment/build.debian.arm64 /build.sh
-# Create the source dir
-RUN mkdir -p ${SOURCE_DIR}
+VOLUME ${SOURCE_DIR}/
VOLUME ${ARTIFACT_DIR}/
-COPY . ${SOURCE_DIR}/
-
ENTRYPOINT ["/build.sh"]
diff --git a/deployment/Dockerfile.debian.armhf b/deployment/Dockerfile.debian.armhf
index d633d316a..ea8c8c8e6 100644
--- a/deployment/Dockerfile.debian.armhf
+++ b/deployment/Dockerfile.debian.armhf
@@ -32,11 +32,8 @@ RUN dpkg --add-architecture armhf \
# Link to build script
RUN ln -sf ${SOURCE_DIR}/deployment/build.debian.armhf /build.sh
-# Create the source dir
-RUN mkdir -p ${SOURCE_DIR}
+VOLUME ${SOURCE_DIR}/
VOLUME ${ARTIFACT_DIR}/
-COPY . ${SOURCE_DIR}/
-
ENTRYPOINT ["/build.sh"]
diff --git a/deployment/Dockerfile.ubuntu.amd64 b/deployment/Dockerfile.ubuntu.amd64
index e1b0c3975..e61be4efc 100644
--- a/deployment/Dockerfile.ubuntu.amd64
+++ b/deployment/Dockerfile.ubuntu.amd64
@@ -24,11 +24,8 @@ RUN wget https://download.visualstudio.microsoft.com/download/pr/d731f991-8e68-4
# Link to build script
RUN ln -sf ${SOURCE_DIR}/deployment/build.ubuntu.amd64 /build.sh
-# Create the source dir
-RUN mkdir -p ${SOURCE_DIR}
+VOLUME ${SOURCE_DIR}/
VOLUME ${ARTIFACT_DIR}/
-COPY . ${SOURCE_DIR}/
-
ENTRYPOINT ["/build.sh"]
diff --git a/deployment/Dockerfile.ubuntu.arm64 b/deployment/Dockerfile.ubuntu.arm64
index 98dfbf7dd..e34ef7edd 100644
--- a/deployment/Dockerfile.ubuntu.arm64
+++ b/deployment/Dockerfile.ubuntu.arm64
@@ -43,11 +43,8 @@ RUN rm /etc/apt/sources.list \
# Link to build script
RUN ln -sf ${SOURCE_DIR}/deployment/build.ubuntu.arm64 /build.sh
-# Create the source dir
-RUN mkdir -p ${SOURCE_DIR}
+VOLUME ${SOURCE_DIR}/
VOLUME ${ARTIFACT_DIR}/
-COPY . ${SOURCE_DIR}/
-
ENTRYPOINT ["/build.sh"]
diff --git a/deployment/Dockerfile.ubuntu.armhf b/deployment/Dockerfile.ubuntu.armhf
index 30cd86135..6f92c81ab 100644
--- a/deployment/Dockerfile.ubuntu.armhf
+++ b/deployment/Dockerfile.ubuntu.armhf
@@ -43,11 +43,8 @@ RUN rm /etc/apt/sources.list \
# Link to build script
RUN ln -sf ${SOURCE_DIR}/deployment/build.debian.armhf /build.sh
-# Create the source dir
-RUN mkdir -p ${SOURCE_DIR}
+VOLUME ${SOURCE_DIR}/
VOLUME ${ARTIFACT_DIR}/
-COPY . ${SOURCE_DIR}/
-
ENTRYPOINT ["/build.sh"]