Play framework image

I have created an image based on link at the end:

here is my version of Dockerfile
FROM ubuntu:15.04
MAINTAINER Rafiqul Islam
RUN apt-get update
RUN apt-get install -y wget
RUN wget --no-check-certificate --no-cookies --header "Cookie: oraclelicense=accept-securebackup-cookie” xxxx
RUN apt-get install alien
RUN alien -i jdk-8u11-linux-x64.rpm
RUN apt-get install -y unzip
RUN wget
RUN unzip
ENV PATH $PATH:/activator-1.3.6
EXPOSE 9000 8888
RUN mkdir /app
CMD [“activator”, “run”]

image building went fine.

Could anyone please help understanding me the container creation to mount my app folder in container based on the link’s example

docker run -d
-v /path/to/your/play/app:/app:rw
-p 80:9000

I did not understand the second command line. if i have my contents in : etc/apps/ then how this command would look like: -v /path/to/your/play/app:/app:rw \


To understand docker volumes better you can go through this article

The -v option shown in the example is using Docker Volume for mounting a directory from the host machine to the container. So it takes the following form.

-v hostpath:containerpath:mount-option
eg: -v /etc/apps:/app:rw

Here /etc/apps = HostPath
     /app = ContainerPath
     rw = Mount in Read/Write mode

Now the answer for your question is as follows. If you have your contents in /etc/apps of your host then you can mount that to /app in your container.

1 Like

thanks very much ranjan!! I am not finding the button to mark it solved.

Ranjan could you please help bit further? I have run
docker run -d -v /etc/app: /app:rw -p 80:9000 ingensi/play-framework
I am running this command however giving error….invalid value “/etc/app:” for flag -v: is not an absolute path. I think I have given absolute path!!


I can see a space between /etc/app: and /app. There shouldn’t be any space between those two values.


I feel bit sorry now cause I am asking repeated question!!! You have been very generous. I dont know why the container gets down once created. and it does not start. its an official image though by oracle + playframework. Do you have any clue?