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

Fails to build docker image in Java project #156

Open
cwensel opened this issue Jan 18, 2023 · 3 comments
Open

Fails to build docker image in Java project #156

cwensel opened this issue Jan 18, 2023 · 3 comments

Comments

@cwensel
Copy link

cwensel commented Jan 18, 2023

When using this construct in a Java project, the docker build fails (via cdk synth) because it cannot find a lock file.

The Dockerfile in the source directory is not building a Node app so has no javascript dependencies.

Running docker build . in the same source directory succeeds.

org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.codehaus.mojo:exec-maven-plugin:3.0.0:java (default-cli) on project deploy: An exception occured while executing the Java class. Cannot find a package lock file (`pnpm-lock.yaml`, `yarn.lock` or `package-lock.json`). Please specify it with `depsLockFilePath`.
Error: Cannot find a package lock file (`pnpm-lock.yaml`, `yarn.lock` or `package-lock.json`). Please specify it with `depsLockFilePath`.
    at findLockFile (/private/var/folders/6p/nfwpmyxs7c761mfx9702wz_c0000gt/T/jsii-kernel-1qMcr5/node_modules/aws-cdk-lib/aws-lambda-nodejs/lib/function.js:1:2083)
    at new NodejsFunction (/private/var/folders/6p/nfwpmyxs7c761mfx9702wz_c0000gt/T/jsii-kernel-1qMcr5/node_modules/aws-cdk-lib/aws-lambda-nodejs/lib/function.js:1:1072)
    at new DockerImageDeployment (/private/var/folders/6p/nfwpmyxs7c761mfx9702wz_c0000gt/T/jsii-kernel-1qMcr5/node_modules/cdk-docker-image-deployment/lib/docker-image-deployment.js:55:32)
    at Kernel._create (/private/var/folders/6p/nfwpmyxs7c761mfx9702wz_c0000gt/T/jsii-java-runtime3528284627820127700/lib/program.js:8467:29)
    at Kernel.create (/private/var/folders/6p/nfwpmyxs7c761mfx9702wz_c0000gt/T/jsii-java-runtime3528284627820127700/lib/program.js:8196:29)
    at KernelHost.processRequest (/private/var/folders/6p/nfwpmyxs7c761mfx9702wz_c0000gt/T/jsii-java-runtime3528284627820127700/lib/program.js:11482:36)
    at KernelHost.run (/private/var/folders/6p/nfwpmyxs7c761mfx9702wz_c0000gt/T/jsii-java-runtime3528284627820127700/lib/program.js:11442:22)
    at Immediate._onImmediate (/private/var/folders/6p/nfwpmyxs7c761mfx9702wz_c0000gt/T/jsii-java-runtime3528284627820127700/lib/program.js:11443:46)
    at process.processImmediate (node:internal/timers:471:21)
@Nath-Ninja
Copy link

I get the same for a very simple python Container, docker build . runs fine, and absolutetly no javascript dependencies

@rotparmna
Copy link

I get the same for a very simple .NET Core Container

@LeuisKen
Copy link

LeuisKen commented Jul 25, 2024

Same issue here with .NET app, wondering if this project is still being maintained. @scanlonp

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

No branches or pull requests

4 participants