Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changed Dockerfile to resolve version conflict for libapt-pkg5.0 #515

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

leinenk
Copy link

@leinenk leinenk commented Feb 7, 2025

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:

  • Removed the problematic NodeSource repository setup
  • Added the n version manager installation
  • Installed Node.js 10.24.1 using n

Copy link

google-cla bot commented Feb 7, 2025

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant