Since we can't use the TasksMax value in the docker.service
file by default, we can uncomment it at buildtime.
See docker/docker/pull/21491 for some background.
Signed-off-by: Christy Perez <christy@linux.vnet.ibm.com>
| ... | ... |
@@ -86,6 +86,16 @@ set -e |
| 86 | 86 |
cat >> "$DEST/$version/Dockerfile.build" <<-EOF |
| 87 | 87 |
RUN cp -aL hack/make/.build-deb debian |
| 88 | 88 |
RUN { echo '$debSource (${debVersion}-0~${suite}) $suite; urgency=low'; echo; echo ' * Version: $VERSION'; echo; echo " -- $debMaintainer $debDate"; } > debian/changelog && cat >&2 debian/changelog
|
| 89 |
+ EOF |
|
| 90 |
+ # Remove the following case-based substitution when none of these are supported, and the TasksMax value is uncommented in docker.service |
|
| 91 |
+ case "$version" in |
|
| 92 |
+ debian-jessie|debian-wheezy|ubuntu-precise|ubuntu-trusty|ubuntu-wily) |
|
| 93 |
+ ;; |
|
| 94 |
+ *) |
|
| 95 |
+ echo "RUN sed -i -- 's/#TasksMax=infinity/TasksMax=infinity/' contrib/init/systemd/docker.service" >> "$DEST/$version/Dockerfile.build" |
|
| 96 |
+ ;; |
|
| 97 |
+ esac |
|
| 98 |
+ cat >> "$DEST/$version/Dockerfile.build" <<-EOF |
|
| 89 | 99 |
RUN dpkg-buildpackage -uc -us |
| 90 | 100 |
EOF |
| 91 | 101 |
tempImage="docker-temp/build-deb:$version" |