2
votes

I have developed a webapplication using struts with sql. I want to deploy my webapp into ecs using aws pipeline. Using docker for the build environment, While running the command,

docker build -t mydocker .

I am getting below error

Sending build context to Docker daemon 46.59kB Error response from daemon: No build stage in current context

This is my Dockerfile

FROM ubuntu:latest
MAINTAINER My Name "[email protected]"
RUN apt-get update && apt-get upgrade -y
RUN apt-get install nginx -y
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]

Please help me build an image. Please post the dockerfile commands what i should mention.

2
Can you share your docker-file? Your question is not formatted properly also - Shankar Shastri

2 Answers

0
votes

DockerFile:

FROM ubuntu:latest
MAINTAINER My Name "[email protected]"
RUN apt-get update && apt-get upgrade -y
RUN apt-get install nginx -y
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]

This is the command using which you can build your docker-image.

docker build - < Dockerfile
-1
votes

Name of your file should be Dockerfile instead of any other naming like dockerfile, dockerFile, etc.