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

The latest kernel image breaks images that override the /opt/ibm/docker/docker-server script #143

Closed
jthurne opened this Issue Feb 20, 2018 · 5 comments

Comments

Projects
None yet
2 participants
@jthurne

jthurne commented Feb 20, 2018

We override the docker-server script because we need to set many environment variables in order for our application to work properly. Unfortunately, the recent commit that added an ENTRYPOINT to the kernel docker file. broke us.

Specifically, when we try to start after building an image using the latest webpshere-liberty images, the container fails to start with:

CWWKE0013E: Unknown option: /opt/ibm/wlp/bin/server

Usage: /opt/ibm/wlp/bin/server action serverName [options]

    serverName
	A locally unique name for the server; the name can be constructed
	using Unicode alphanumeric characters (for example, A-Za-z0-9), the
	underscore (_), dash (-), plus (+) and period (.). A server name
	cannot begin with a dash (-) or period (.).

Actions:

    create
	Create a new server if the specified server does not exist. The
	--template option can be used to specify a template to use when
	creating a new server.

    debug
	Run the named server in the console foreground after a debugger
	connects to the debug port (default: 7777).

    dump
	Dump diagnostic information from the server into an archive. The
	--archive option can be used.  The --include option can be used with
	the "heap", "system" and "thread" values.

    help
	Print help information.

    javadump
	Dump diagnostic information from the server JVM. The --include
	option can be used with the "heap" and "system" values.

    list
	List the Liberty profile application servers that are defined.

    package
	Package a server to an archive. The --archive option can be used.
	The --include option can be used with values "all", "usr", "minify",
	"wlp", "runnable", "all,runnable", and "minify,runnable". The values
	"runnable" and "all,runnable" are equivalent. The "runnable" value
	works with "jar" type archives only.

    pause
	Pause all the components in the server that can be paused. You can
	pause a subset of the components by specifying the components on the
	--target option.

    registerWinService
	Register the server specified as a Windows Service program.

    resume
	Resume all paused components in the server. You can specify the
	--target option to resume specific paused components.

    run
	Run the named server in the console foreground.

    start
	Start the named server.

    startWinService
	Start the server specified as a Windows Service program.
	It must be registered before starting.

    status
	Check the status of the named server.

    stop
	Stop the running instance of the named server.

    stopWinService
	Stop the server specified as a Windows Service program.

    unregisterWinService
	Unregister the server specified as a Windows Service program.

    version
	Show server version information and exit.

Options:

    --archive="path to the target archive file"
	Specify the archive target to be generated by the package or dump
	action. The target can be specified either as an absolute path or
	as a relative path. If this option is omitted, the archive file will
	be created in the server output directory. The target file name
	extension might influence the format of the generated archive.
	The default archive format for the package action is "pax" on z/OS
	and "zip" on all other platforms.
	Archive format "jar" will produce a self-extracting jar similar to
	the original installer archive.
	Archive format "jar" combined with "runnable" on the --include option
	produces a runnable jar file that can run the Liberty server from
	the jar file by using java -jar.

    --clean
	Clean all cached information related to this server instance.

    --include=value,value,...
	A comma-delimited list of values. The valid values vary depending on
	the action.

    --os=value,value,...
	Specifies the operating systems that you want the packaged server to
	support. Supply a comma-separated list. The default value is any,
	indicating that the server is to be deployable to any operating
	system supported by the source.
	To specify that an operating system is not to be supported, prefix it
	with a minus sign ("-"). For a list of operating system values, refer
	to the OSGi Alliance web site at the following URL:
	http://www.osgi.org/Specifications/Reference#os
	This option applies only to the package operation, and can be used
	only with the --include=minify option. If you exclude an operating
	system, you cannot later include it if you repeat the minify
	operation on the archive.

    --target=value,value
	Specifies a comma-delimited list of components that you can pause or
	resume.

    --template="templateName"
	Specify the name of the template to use when creating a new server.

@jthurne jthurne changed the title from The latest microprofile image fails to start to The latest images fail to start Feb 20, 2018

@jthurne

This comment has been minimized.

Show comment
Hide comment
@jthurne

jthurne Feb 20, 2018

When I build and run the docker images locally, they start up. We are investigating why they are failing when we pull the images from the Docker registries.

jthurne commented Feb 20, 2018

When I build and run the docker images locally, they start up. We are investigating why they are failing when we pull the images from the Docker registries.

@davidcurrie

This comment has been minimized.

Show comment
Hide comment
@davidcurrie

davidcurrie Feb 20, 2018

Contributor

I've just pulled websphere-liberty:latest and it runs for me...

Contributor

davidcurrie commented Feb 20, 2018

I've just pulled websphere-liberty:latest and it runs for me...

@jthurne jthurne changed the title from The latest images fail to start to The latest kernel image breaks images that override the /opt/ibm/docker/docker-server script Feb 20, 2018

@jthurne

This comment has been minimized.

Show comment
Hide comment
@jthurne

jthurne Feb 20, 2018

We figured out what it is. I'm updating the issue and description with the real problem.

jthurne commented Feb 20, 2018

We figured out what it is. I'm updating the issue and description with the real problem.

@jthurne

This comment has been minimized.

Show comment
Hide comment
@jthurne

jthurne Feb 20, 2018

We can fix this issue by changing the last line of our docker-server script from:

exec /opt/ibm/wlp/bin/server $@

to

exec "$@"

However, we're going to update our docker image to invoke a script we write that will then invoke docker-server. That way, we're no longer overriding docker-server directly.

jthurne commented Feb 20, 2018

We can fix this issue by changing the last line of our docker-server script from:

exec /opt/ibm/wlp/bin/server $@

to

exec "$@"

However, we're going to update our docker image to invoke a script we write that will then invoke docker-server. That way, we're no longer overriding docker-server directly.

@jthurne jthurne closed this Feb 20, 2018

@davidcurrie

This comment has been minimized.

Show comment
Hide comment
@davidcurrie

davidcurrie Feb 20, 2018

Contributor

@jthurne - or now docker-server is the entrypoint, you can just change the CMD.

Contributor

davidcurrie commented Feb 20, 2018

@jthurne - or now docker-server is the entrypoint, you can just change the CMD.

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