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

jib may can not be extends environments from "from" image #699

Closed
qiankunli opened this issue Jul 24, 2018 · 3 comments
Closed

jib may can not be extends environments from "from" image #699

qiankunli opened this issue Jul 24, 2018 · 3 comments

Comments

@qiankunli
Copy link

qiankunli commented Jul 24, 2018

I tried to run a springboot project with jib-maven-plugin, the detail as follows:

"from" image dockerfile

FROM alpine:latest

ENV JAVA_VERSION_MAJOR=8 \
    JAVA_VERSION_MINOR=65 \
    JAVA_HOME=/usr/local/jdk \
    PATH=${PATH}:/usr/local/jdk/bin \
    GLIBC_VERSION=2.23-r3 \
    LANG=C.UTF-8

jib-maven-plugin

<plugin>
	<groupId>com.google.cloud.tools</groupId>
	<artifactId>jib-maven-plugin</artifactId>
	<version>0.9.7</version>
	<configuration>
		<allowInsecureRegistries>true</allowInsecureRegistries>
		<from>
			<image>harbor.test.xx.com/test/jdk8</image>
		</from>
		<to>
			<image>harbor.test.xx.com/test/jib-springboot-demo</image>
		</to>
		<container>
		      <mainClass>com.xx.springboot.demo.DockerSpringbootDemoApplication</mainClass>
		</container>
	</configuration>
</plugin>

docker inspect harbor.test.xx.com/test/jib-springboot-demo output

"Config": {
            "Hostname": "",
            "Domainname": "",
            "User": "",
            "AttachStdin": false,
            "AttachStdout": false,
            "AttachStderr": false,
            "Tty": false,
            "OpenStdin": false,
            "StdinOnce": false,
            "Env": [],
            "Cmd": [],
            "Image": "",
            "Volumes": null,
            "WorkingDir": "",
            "Entrypoint": [
                "java",
                "-cp",
                "/app/libs/*:/app/resources/:/app/classes/",
                "com.ximalaya.springboot.demo.DockerSpringbootDemoApplication"
            ],
            "OnBuild": null,
            "Labels": null
        },

docker run -d -P harbor.test.xx.com/test/jib-springboot-demo output

docker: Error response from daemon: oci runtime error: container_linux.go:247: starting container process caused "exec: "java": executable file not found in $PATH".

it shows Environments in harbor.test.xx.com/test/jib-springboot-demo is empty, so the java command can not be find in $PATH

@coollog
Copy link
Contributor

coollog commented Jul 24, 2018

Hi @qiankunli , thanks for reporting this! This is a known issue that we are addressing in #595.

@TadCordle
Copy link
Contributor

This is a known issue that we are addressing in #595.

Since we're already tracking this in a different issue, I'm going to close this one for now. Feel free to keep talking here or in #595.

@chanseokoh
Copy link
Member

@qiankunli this now works in 0.9.8: #595 (comment)

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