Hi Guys, Im trying to run spring application (Ceylon) with docker, but i'm not able to run any ceylon module inside the container. To demonstrate what is my problem i have an example. You can find it here https://github.com/voiii/ceylon-docker-example . This is simple ceylon module containing single run.ceylon file which should output "Hello From docker!"--I build ceylon example module running
ceylon compile
The effect is
Note: Created module com.docker.example/1.0.0
I moved out the modules out of the project to "simulate" docker env. I have put it in previous mentioned repository. I "cd" to repository main directory. ls -al output
drwxr-xr-x 7 voitech staff 224 15 gru 11:56 .
drwxr-xr-x 14 voitech staff 448 15 gru 11:48 ..
drwxr-xr-x 13 voitech staff 416 15 gru 15:59 .git
-rw-r--r-- 1 voitech staff 101 15 gru 12:01 Dockerfile
-rw-r--r-- 1 voitech staff 11357 15 gru 11:48 LICENSE
-rw-r--r-- 1 voitech staff 70 15 gru 11:48 README.md
drwxr-xr-x 3 voitech staff 96 15 gru 11:55 modules
I also have Dockerfile but this will be used next.
I run
And i get expected output.
ceylon run com.docker.example
Hello From docker!
(this is my mac operating system run, so it is not run from docker yet)I want to build a Docker image now, so i have Dockerfile
FROM ceylon/ceylonWORKDIR /srvCOPY ./modules/* modulesRUN find .CMD ceylon run com.docker.exampleWhat happens here:- I use latest Ceylon image as a source (is it correct?).- I have /srv directory as working dir.- I'm copping ./modules directory from my operating system to docker image /srv/modules- I want to be sure that modules in srv so i "find ." to find out what is in /srv (workdir)- Docker run, should run ceylon run com.docker.example from working directory /srv (am i correct?)I build an image
docker build -t example ./
Sending build context to Docker daemon 102.9kB
Step 1/5 : FROM ceylon/ceylon
---> 297b765af430
Step 2/5 : WORKDIR /srv
---> 6cf9705b6680
Removing intermediate container 69538c3c9aec
Step 3/5 : COPY ./modules/* modules
---> b08df9c8b5ab
Step 4/5 : RUN find .
---> Running in 2316d62129ac
.
./modules
./modules/docker
./modules/docker/example
./modules/docker/example/1.0.0
./modules/docker/example/1.0.0/com.docker.example-1.0.0.car
./modules/docker/example/1.0.0/com.docker.example-1.0.0.car.sha1
./modules/docker/example/1.0.0/com.docker.example-1.0.0.src.sha1
./modules/docker/example/1.0.0/com.docker.example-1.0.0.src
---> b3e18122b98b
Removing intermediate container 2316d62129ac
Step 5/5 : CMD ceylon run com.docker.example
---> Running in c8b690624871
---> 0bf03ce50954
Removing intermediate container c8b690624871
Successfully built 0bf03ce50954
Successfully tagged example:latest
I have na image. As You can see /srv/modules contains example module.I run the docker imageI get output
docker run example
ceylon run: Module com.docker.example not found in the following repositories:
/usr/share/ceylon/1.3.3/repo
/srv/modules
/app/.ceylon/cache
https://modules.ceylon-lang.org/repo/1
[Maven] Aether
[NPM] npm
WHY ??? I'm struggling with this several day now. Why "ceylon run" can't find this "com.docker.example" module. It was fine on my operating system. Why in docker it doesn't work ?? It should be run the same way. I have tried running this module from different working dir manipulating ceylon "--cwd" option but it doesn't work. I tried putting this module (with all directory structure above so "/com/example/docker...") in /app/.ceylon/cache, /usr/share/ceylon/1.3.3/repo. Still it doesn't work.Please HELP!
You received this message because you are subscribed to the Google Groups "ceylon-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ceylon-users+unsubscribe@googlegroups.com.
To post to this group, send email to ceylon...@googlegroups.com.
Visit this group at https://groups.google.com/group/ceylon-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/ceylon-users/dba56c59-35ff-4de3-aada-b469bf236a23%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.