Giter VIP home page Giter VIP logo

Comments (2)

arjraman avatar arjraman commented on September 27, 2024

Hey @20vitality12, this is just a quick diagnosis, so it could be a different issue. But from testing your code myself, I think it's because Docker isn't installed in the container. The aws-actions/amazon-ecr-login action uses docker login to login the user to their ECR registry, which is where you most likely got your error.

To test this, I ran this job:

jobs:
  build-test:
    runs-on: ubuntu-latest
    container: node:14
    services:
      postgres:
        image: postgres:10.2
        env:
          POSTGRES_DB: postgres
          POSTGRES_USER: postgres
          POSTGRES_PASSWORD: postgres
          POSTGRES_PORT: 5432
        ports:
          - 5432:5432
        options: >-
          --health-cmd pg_isready
          --health-interval 10s
          --health-timeout 5s
          --health-retries 5
    outputs:
      JOB_STATUS: ${{ steps.deployment.outputs.status }}
    steps:
      - name: Test docker
        run: docker

and got the following error:
Screen Shot 2022-08-07 at 4 08 32 PM

As you can see, Docker wasn't found. See if you can run commands to install it in a previous step using the link here.

from amazon-ecr-login.

20vitality12 avatar 20vitality12 commented on September 27, 2024

@arjraman thx you! I have resolved this issue with removing container: node:14 ant setup postgres ports to 5432/tcp and access db with locahost

jobs:
  deploy:
    runs-on: ubuntu-latest
    services:
      postgres:
        image: postgres:10.2
        ports:
          - 5432/tcp
    steps:
      ...
      - name: Prisma generate && migrate deploy
        env:
          DATABASE_URL: postgresql://postgres:postgres@localhost:${{ job.services.postgres.ports[5432] }}/postgres?schema=public
        run: npx nx generate:client prisma && npx nx migrate:deploy prisma              

${{ job.services.postgres.ports[5432] }} also important to use this command

from amazon-ecr-login.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.