Changed Dockerfile to resolve version conflict for libapt-pkg5.0 #515
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When trying to build a dockerimage for CDAP 6.10.1, I received following error during the build process:
The following packages have unmet dependencies:
dpkg : Breaks: libapt-pkg5.0 (< 1.7~b) but 1.4.11 is to be installed
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.
The command '/bin/sh -c tar -zcvf cdap-build-sources.tar.gz --exclude='.git*' --exclude='node_modules' --exclude='target' --exclude-vcs --exclude-vcs-ignores app-artifacts cdap eventwriters-extensions metricswriters-extensions security-extensions Dockerfile LICENSE.txt README.md && apt-get update && apt-get install -y lsb-release && apt-get install -y apt-transport-https && DISTRO="$(lsb_release -s -c)" && echo "deb [signed-by=/usr/share/keyrings/nodesource.gpg] https://deb.nodesource.com/node_10.x ${DISTRO} main" | tee -a /etc/apt/sources.list.d/nodesource.list && curl https://deb.nodesource.com/gpgkey/nodesource.gpg.key -o /usr/share/keyrings/nodesource.gpg.key && apt-key --keyring /usr/share/keyrings/nodesource.gpg add /usr/share/keyrings/nodesource.gpg.key && apt-get update && /bin/bash -c 'apt-get -y install nodejs' && mvn install -f cdap -B -V -Ddocker.skip=true -DskipTests -P 'templates,!unit-tests' && mvn install -B -V -Ddocker.skip=true -DskipTests -P 'templates,dist,k8s,!unit-tests' -Dadditional.artifacts.dir="$DIR/app-artifacts" -Dsecurity.extensions.dir="$DIR/security-extensions" -Dmetricswriters.extensions.dir="$DIR/metricswriters-extensions" -Deventwriters.extensions.dir="$DIR/eventwriters-extensions" -Dextend-default-configs="$EXTEND_DEFAULT_CONFIGS" -Dconfig-path="$DIR/$CONFIG_FILE_NAME" -Dui.build.name=cdap-non-optimized-full-build' returned a non-zero code: 100
I was able to solve the problem with the adjustments I made to the Dockerfile. The main changes are in the build stage where I've: