You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a project that I spun up with a docker compose file. The images are both in my azure container registry. The container instances were created fine. I used this GitHub action to build and push my images to the registry. This part works fine, and I can verify that the images were correctly updated. When I go to restart the container instances, I get the following error:
Failed to restart the container group 'my-container-group'. Error: Multiple error occurred: 'BadRequest':'InaccessibleImage':The image '{myregistry}/my-repo:my-image-tag' in container group 'my-container-group' is not accessible. Please check the image and registry credential.
This error repeats itself for the other image.
Here is my workflow file:
name: docker_build_push_acr
on:
push:
branches:
- main
jobs:
docker_build_push_acr:
name: "Docker Build and Push to ACR"
runs-on: ubuntu-latest
environment: production
# Use the Bash shell regardless whether the GitHub Actions runner is ubuntu-latest, macos-latest, or windows-latest
defaults:
run:
shell: bash
steps:
# Checkout the repository to the GitHub Actions runner
- name: Checkout
uses: actions/checkout@main
- name: "Docker Login"
uses: azure/docker-login@v1
with:
login-server: ${{ secrets.REGISTRY_LOGIN_SERVER }}
username: ${{ secrets.REGISTRY_USERNAME }}
password: ${{ secrets.REGISTRY_PASSWORD }}
- run: |
docker build -t ${{ secrets.REGISTRY_LOGIN_SERVER }}/my-repo:frontend-image ./front-end-directory
docker push ${{ secrets.REGISTRY_LOGIN_SERVER }}/my-repo:frontend-image
docker build -t ${{ secrets.REGISTRY_LOGIN_SERVER }}/my-repo:backend-image ./backend-directory
docker push ${{ secrets.REGISTRY_LOGIN_SERVER }}/my-repo:backend-image
Again, images are pushed to the registry successfully. It is just when I go to restart the container instance that I get this error. I have to delete the container instances and re-initiate them with my docker compose file to get it to start up again.
If it helps, here are my Dockerfiles and docker-compose:
Front end Dockerfile:
FROM node:20-alpine3.18 as build
WORKDIR /usr/app
COPY . /usr/app
RUN npm ci
RUN npm run build
FROM nginx:1.23.1-alpine
EXPOSE 80
COPY ./docker/nginx/conf.d/default.conf /etc/nginx/conf.d/default.conf
COPY --from=build /usr/app/dist /usr/share/nginx/html
Backend Dockerfile:
FROM oven/bun
WORKDIR /app
COPY package.json .
COPY bun.lockb .
RUN bun install --production
COPY src src
COPY tsconfig.json .
# COPY public public
ENV NODE_ENV production
CMD ["bun", "src/index.ts"]
EXPOSE 3009
Hello!
I have a project that I spun up with a docker compose file. The images are both in my azure container registry. The container instances were created fine. I used this GitHub action to build and push my images to the registry. This part works fine, and I can verify that the images were correctly updated. When I go to restart the container instances, I get the following error:
Failed to restart the container group 'my-container-group'. Error: Multiple error occurred: 'BadRequest':'InaccessibleImage':The image '{myregistry}/my-repo:my-image-tag' in container group 'my-container-group' is not accessible. Please check the image and registry credential.
This error repeats itself for the other image.
Here is my workflow file:
Again, images are pushed to the registry successfully. It is just when I go to restart the container instance that I get this error. I have to delete the container instances and re-initiate them with my docker compose file to get it to start up again.
If it helps, here are my Dockerfiles and docker-compose:
Front end Dockerfile:
Backend Dockerfile:
Docker-compose:
Any help would be greatly appreciated!
The text was updated successfully, but these errors were encountered: