Skip to content

docs : 도커파일 수정 #39

docs : 도커파일 수정

docs : 도커파일 수정 #39

Workflow file for this run

name: Build and Push Docker Image
on:
push:
branches:
- develop
jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Configure Docker daemon for insecure registry
run: |
echo '{"insecure-registries":["58.79.16.12:5000"]}' | sudo tee /etc/docker/daemon.json > /dev/null
sudo systemctl restart docker
- name: Log in to Docker registry using HTTP
run: echo "${{ secrets.DOCKER_PASSWORD }}" | docker login http://58.79.16.12:5000 --username ${{ secrets.DOCKER_USERNAME }} --password-stdin
- name: Show build context files
run: ls -R
- name: Build Docker image
run: |
docker build --no-cache --build-arg REACT_APP_API_BASE_URL=${{ secrets.REACT_APP_API_BASE_URL }} -f Dockerfile -t 58.79.16.12:5000/athlete_user_frontend:${{ github.sha }} .
- name: Push Docker image to registry
run: |
docker push 58.79.16.12:5000/athlete_user_frontend:${{ github.sha }}
- name: Add additional tag and push
run: |
docker tag 58.79.16.12:5000/athlete_user_frontend:${{ github.sha }} 58.79.16.12:5000/athlete_user_frontend:latest
docker push 58.79.16.12:5000/athlete_user_frontend:latest