Reputation: 1
many developers. This is my first question and I can't solve this.
I'm using AWS For to deploy out webapp and projects.
and now I just want to deploy so tiny project.
(like just basic django project)
I already test this in local(with "python manage.py runserver").
and build & run dockerfile.
But Deploying is failed with AWS continually.
I write Dockerfile and I use it.
But AWS says to me
"cat: /var/app/current/Dockerrun.aws.json: No such file or directory"
and I don't understand what it says.
This is my code in DockerFile
FROM {{mydockerId}}/myproject:base
COPY . /srv/FestivalMusicList
# static directory setting
RUN cp -f /srv/FestivalMusicList/.config/nginx.conf /etc/nginx/nginx.conf &&\
cp -f /srv/FestivalMusicList/.config/nginx-app.conf /etc/nginx/sites-available/ &&\
rm -f /etc/nginx/site-enabled/* &&\
ln -sf /etc/nginx/sites-available/nginx-app.conf /etc/nginx/sites-enabled/
RUN cp /srv/FestivalMusicList/.config/supervisord.conf /etc/supervisor/conf.d/
RUN mkdir /var/log/celery
EXPOSE 80
This is error
[2019-04-05T15:05:33.308Z] INFO [3747] - [Application deployment app-cdf1-190406_000132@1/StartupStage0/EbExtensionPostBuild/Infra-EmbeddedPostBuild/postbuild_0_festival_music_list/Command 04_setdata_genre] : Starting activity...
[2019-04-05T15:05:33.310Z] INFO [3747] - [Application deployment app-cdf1-190406_000132@1/StartupStage0/EbExtensionPostBuild/Infra-EmbeddedPostBuild/postbuild_0_festival_music_list/Command 04_setdata_genre] : Completed activity.
[2019-04-05T15:05:33.310Z] INFO [3747] - [Application deployment app-cdf1-190406_000132@1/StartupStage0/EbExtensionPostBuild/Infra-EmbeddedPostBuild/postbuild_0_festival_music_list] : Completed activity.
[2019-04-05T15:05:33.310Z] INFO [3747] - [Application deployment app-cdf1-190406_000132@1/StartupStage0/EbExtensionPostBuild/Infra-EmbeddedPostBuild] : Completed activity.
[2019-04-05T15:05:33.328Z] INFO [3747] - [Application deployment app-cdf1-190406_000132@1/StartupStage0/EbExtensionPostBuild] : Completed activity.
[2019-04-05T15:05:33.328Z] INFO [3747] - [Application deployment app-cdf1-190406_000132@1/StartupStage0/InfraCleanEbExtension] : Starting activity...
[2019-04-05T15:05:33.329Z] INFO [3747] - [Application deployment app-cdf1-190406_000132@1/StartupStage0/InfraCleanEbExtension] : Completed activity. Result:
Cleaned ebextensions subdirectories from /tmp.
[2019-04-05T15:05:33.329Z] INFO [3747] - [Application deployment app-cdf1-190406_000132@1/StartupStage0] : Completed activity. Result:
Application deployment - Command CMD-Startup stage 0 completed
[2019-04-05T15:05:33.329Z] INFO [3747] - [Application deployment app-cdf1-190406_000132@1/StartupStage1] : Starting activity...
[2019-04-05T15:05:33.329Z] INFO [3747] - [Application deployment app-cdf1-190406_000132@1/StartupStage1/AppDeployEnactHook] : Starting activity...
[2019-04-05T15:05:33.331Z] INFO [3747] - [Application deployment app-cdf1-190406_000132@1/StartupStage1/AppDeployEnactHook/00run.sh] : Starting activity...
[2019-04-05T15:05:39.636Z] INFO [3747] - [Application deployment app-cdf1-190406_000132@1/StartupStage1/AppDeployEnactHook/00run.sh] : Activity execution failed, because: cat: /var/app/current/Dockerrun.aws.json: No such file or directory
cat: /var/app/current/Dockerrun.aws.json: No such file or directory
01a93e5ed8e11b0c76133e5e446764a8ec95ddd1db144be5d3fceca9fd6c0813
Docker container quit unexpectedly after launch: Docker container quit unexpectedly on Fri Apr 5 15:05:39 UTC 2019:. Check snapshot logs for details. (ElasticBeanstalk::ExternalInvocationError)
caused by: cat: /var/app/current/Dockerrun.aws.json: No such file or directory
cat: /var/app/current/Dockerrun.aws.json: No such file or directory
01a93e5ed8e11b0c76133e5e446764a8ec95ddd1db144be5d3fceca9fd6c0813
Docker container quit unexpectedly after launch: Docker container quit unexpectedly on Fri Apr 5 15:05:39 UTC 2019:. Check snapshot logs for details. (Executor::NonZeroExitStatus
Upvotes: 0
Views: 1263
Reputation: 624
Are you using Elastic Beanstalk? If so, you need the Dockerrun.aws.json
at your root directory.
An example of its contents:
{
"AWSEBDockerrunVersion": "1",
"Image": {
"Name": "janedoe/image",
"Update": "true"
},
"Ports": [
{
"ContainerPort": "1234"
}
],
"Volumes": [
{
"HostDirectory": "/var/app/mydb",
"ContainerDirectory": "/etc/mysql"
}
],
"Logging": "/var/log/nginx",
"Entrypoint": "/app/bin/myapp",
"Command": "--argument"
}
For more information: Official Doc's
Upvotes: 1