I have a very basic Dockerfile, like so;
FROM williamyeh/java8:latest
CMD ["java"]
It is based on William Yeh's slim Java8 image which I need for some other Java apps I want to run.
If I build and execute this on my CentOS box it works fine and runs without issues.
If I upload it to AWS Elastic Beanstalk as part of a zip containing the Dockerfile it doesn't. Now; until recently my Dockerfile pulled all of the rquired Java stuff itself (and was FROM an Ubuntu image) and that did work on EB, the only difference was that I changed it to be FROM a different image, which works on my CentOS box, as I said.
The error log from AWS shows this, which really doesn't help me much;
:[{"status":"FAILURE","msg":"
[CMD-AppDeploy/AppDeployStage0/AppDeployPreHook/03build.sh] command failed with error code 1:
/opt/elasticbeanstalk/hooks/appdeploy/pre/03build.sh\ncat:
Dockerrun.aws.json: No such file or directory\ncat: Dockerrun.aws.json:
No such file or directory\ncat: Dockerrun.aws.json: No such file or
directory\nPulling repository williamyeh/java8\nStatus: Image is up to date
for williamyeh/java8:latest\nSuccessfully pulled
williamyeh/java8:latest\nSending build context to Docker daemon 557.1
kB\rSending build context to Docker daemon 1.114
MB\rSe","returncode":1,"events":[{"msg":"Failed to build Docker image...etc
Note that I am not using a Dockerfile.aws.json, nor did I before when it all worked.
So I can only assume that FROM'ing somehow doesn't work in this case but...why? The documentation is very sparse; Troubleshooting EB
Any tips and suggestions would be welcome
Aucun commentaire:
Enregistrer un commentaire