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

Hi, I am trying to call the python script from Spring boot Java application which is containerized with Google Jib. #4185

Open
NitinSharma1991 opened this issue Feb 13, 2024 · 3 comments

Comments

@NitinSharma1991
Copy link

I am trying to call a python script for some business purposes which is containerized with Google Jib. I would like to know how can I copy python into the jib if it's possible , so that it will allow me to call the script from the application itself.

@igouss
Copy link

igouss commented Feb 14, 2024

I copy shell file like this:

jib {
...
        extraDirectories {
            paths {
                path {
                    from = file('docker/files')
                    into = '/'
                    includes = ['entrypoint.sh']
                }
            }
            permissions = [
                    '/entrypoint.sh'     : '755',
            ]
        }
}

@NitinSharma1991
Copy link
Author

This is just to copy the script file. How about copy python executable to run python script as a process.

@mpeddada1
Copy link
Contributor

@NitinSharma1991 similar to what was described above, to make Python binaries available to your Java application within the container, you can use Jib's extraDirectories feature to copy them into the desired location. This Maven and Gradle doc explains how you can add arbitrary files to the jib container (the python binary can be added the same way). By default, the file will be copied onto the src/main/jib directory but the destination can be customized as instructed in the links attached.

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

No branches or pull requests

4 participants