1

Is it possible to copy an existing WebSphere profile and run it on WebSphere in Docker?

I am doing some research on containerization, virtualization, etc. and am currently working with Docker. Getting WebSphere up and running on Docker is simple enough:

 docker run --name wasserver -h wasserver -p 9043:9043 -p 9443:9443 -d ibmcom/websphere-traditional:install

What I'd like to do is use a profile from another WebSphere instance and run that on the Docker WebSphere. I have tried to do the following in an attempt to mount a directory that contains the profile in question, and to run same:

docker run -v /opt/WebSphere/WAS8_5/:/WASDIR --name myprofileserver -h myprofileserver -p 9043:9043 -p 9443:9443 -d ibmcom/websphere-traditional:install -e PROFILE_NAME=/WASDIR/profiles/myprofile1

The end result of this command is that the container is created, but does not run:

docker: Error response from daemon: oci runtime error: exec: "-e": executable file not found in $PATH

Perhaps there is a switch, setup, or other configuration I am missing here?

Andy Guibert
  • 41,446
  • 8
  • 38
  • 61
Timbuck
  • 233
  • 4
  • 13
  • Stack Overflow is a site for programming and development questions. This question appears to be off-topic because it is not about programming or development. See [What topics can I ask about here](http://stackoverflow.com/help/on-topic) in the Help Center. Perhaps [Super User](http://superuser.com/) or [Unix & Linux Stack Exchange](http://unix.stackexchange.com/) would be a better place to ask. Also see [Where do I post questions about Dev Ops?](http://meta.stackexchange.com/q/134306) – jww Dec 29 '16 at 14:56
  • Doesn't look a good fit for either of those @jww and the answers in that last link all say DevOps questions should generally be posted on SO. There are loads of questions / answers about Docker and a good user knowledgebase about it on SO. The platform itself is directly relevant to programming and development so can you elaborate on the off-topic designation? – johnharris85 Dec 29 '16 at 22:25

1 Answers1

0

The last argument to docker run is the command you want to run inside the container (or the name of the image if you're running the default entrypoint / cmd). You just need to move your environment variable definition back in the command like this:

docker run -v /opt/WebSphere/WAS8_5/:/WASDIR --name myprofileserver -h myprofileserver -p 9043:9043 -p 9443:9443 -d -e PROFILE_NAME=/WASDIR/profiles/myprofile1 ibmcom/websphere-traditional:install

johnharris85
  • 17,264
  • 5
  • 48
  • 52