-1

I am very new to this Containers, so I am unable to deploy the application on the Container instance . I tried below steps but i could not resolve the issue. Please help me out of this. Thanks in advance

steps:

1.I have created the Reactjs build.

2.Created the docker image and Create the container registry and pushed it into docker container instance.

my Docker file is :

FROM nginx: version 
copy /build/user/share/nginx/html

I have created the docker image and build that image and successfully created the docker image I have created the container rgistry and when I trying to push the docker image to container instance after that i am not able to access the application using web.

docker build -t image_name

Can anyone help me that how to access the application through UI

Thanks in Advance!

Vicky
  • 3
  • 1

1 Answers1

0

I tried to reproduce the same issue in my environment and got the below results

I have created and build the npm using below command

npm run build

enter image description here

I have created example docker file and run the file

#docker build -t image_name
FROM node:16.13.1-alpine as build
WORKDIR /app
ENV PATH /app/node/_modules/.bin:$PATH
COPY package.json ./
COPY package-lock.json ./
RUN npm install react-scripts -g --silent
COPY . ./
RUN npm run build

FROM nginx:stable-alpine
COPY --from=build /app/build /usr/share/nginx/html
EXPOSE 80
CMD ["nginx","-g","daemon off"]

I have created the container registry

enter image description here

Enabled the access to to push the image to container registry

enter image description here

I have logged into the container registry using login server credentials

docker login server_name
username:XXXX
password:XXXXX

enter image description here

I have tagged and pushed the image into container registry

docker tag image_name login-server/image
docker push login-server/image_name

enter image description here

I have created the container instances to deploy the container image

While creating in Networking i have given the DNS label and created

enter image description here

By using FQDN link I can able to access the image through UI

enter image description here

Komali Annem
  • 649
  • 1
  • 1
  • 7