File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed
Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -41,7 +41,12 @@ createPersistentDockerDataVolume()
4141 # shellcheck disable=SC2154
4242 echo " Removing old volumes and containers"
4343 # shellcheck disable=SC2046
44- ${BUILD_CONFIG[DOCKER]} rm -f $( ${BUILD_CONFIG[DOCKER]} ps -a --no-trunc -q -f volume=" ${BUILD_CONFIG[DOCKER_SOURCE_VOLUME_NAME]} " ) || true
44+ local old_containers=$( ${BUILD_CONFIG[DOCKER]} ps -a --no-trunc -q -f volume=" ${BUILD_CONFIG[DOCKER_SOURCE_VOLUME_NAME]} " )
45+ if [[ ${old_containers} != " " ]]; then
46+ ${BUILD_CONFIG[DOCKER]} rm -f $( old_containers) || true
47+ else
48+ echo " No old container was found"
49+ fi
4550 ${BUILD_CONFIG[DOCKER]} volume rm -f " ${BUILD_CONFIG[DOCKER_SOURCE_VOLUME_NAME]} " || true
4651
4752 # shellcheck disable=SC2154
Original file line number Diff line number Diff line change @@ -324,7 +324,7 @@ printUserCreate(){
324324 echo "
325325ARG HostUID
326326ENV HostUID=\$ HostUID
327- RUN useradd -u \$ HostUID -ms /bin/bash build
327+ RUN useradd -o - u \$ HostUID -ms /bin/bash build
328328WORKDIR /openjdk/build
329329RUN chown -R build /openjdk/
330330USER build" >> " $DOCKERFILE_PATH "
You can’t perform that action at this time.
0 commit comments