generated from actions/container-action
-
Notifications
You must be signed in to change notification settings - Fork 64
Open
Description
Hi, I'm trying to create the following deployment logic that will build and run a docker container on the AWS EC2 instance.
name: scp files
on: [push]
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Pull changes and run docker
uses: fifsky/ssh-action@master
with:
command: |
cd test_ec2_deployment
git pull
sudo docker build --network host -f Dockerfile -t test .
sudo docker run -d --env-file=/home/ubuntu/.env -ti test
host: ${{ secrets.HOST }}
user: ubuntu
key: ${{ secrets.SSH_KEY }}
args: "-tt"
The problem is that at the end of the docker build it is stuck and doesn't run sudo docker run... command. This is the last output:
Step 12/13 : RUN /usr/bin/crontab /etc/cron.d/cron-job
---> Running in 52a5a0174958
Removing intermediate container 52a5a0174958
---> badf6fdaf774
Step 13/13 : CMD printenv > /etc/environment && cron -f
---> Running in 0e9fd12db4f7
Removing intermediate container 0e9fd12db4f7
---> 888a2a9e5910
Successfully built 888a2a9e5910
Successfully tagged test:latest
Any suggestions would be appreciated.
Metadata
Metadata
Assignees
Labels
No labels