Skip to content

use port 5001

use port 5001 #4

Workflow file for this run

name: Docker Image CICD
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Log in to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
# Build the Docker image
- name: Build Docker image
run: docker build -t ${{ secrets.DOCKER_USERNAME }}/jahnavi-docker-app:latest .
# Push the Docker image to Docker Hub
- name: Push Docker image
run: docker push ${{ secrets.DOCKER_USERNAME }}/jahnavi-docker-app:latest
# Run the Docker container (if applicable)
- name: Run Docker container
run: docker run -p 5001:5001 ${{ secrets.DOCKER_USERNAME }}/jahnavi-docker-app:latest