Skip to content

Little docker image based on alpine with ssh-client and bash

Notifications You must be signed in to change notification settings

lskjs/rsync

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

@lskjs/rsync

A little docker image based on alpine with ssh-client and bash

using from GitLab CI

deploy_staging:
  stage: deploy
  image: lskjs/rsync
  environment:
    name: staging
    url: https://sample-app.net
  script:
    - mkdir -p ~/.ssh
    - chmod 700 ~/.ssh
    - echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config
    - echo "$SSH_PRIVATE_KEY_STAGING" > ~/.ssh/id_rsa
    - chmod 600 ~/.ssh/id_rsa
    - rsync -avz deploy/app_staging/. $DEPLOY_STAGING_SSH_HOST:~/app
    - rsync -avz src/project/conf/. $DEPLOY_STAGING_SSH_HOST:~/app/conf
    - ssh $DEPLOY_STAGING_SSH_HOST 'chmod 700 ~/app/app.sh'
    - ssh $DEPLOY_STAGING_SSH_HOST 'cd ~/app && ./app.sh --file docker-compose-staging.yml up'
    - ssh $DEPLOY_STAGING_SSH_HOST 'cd ~/app && ./app.sh --file docker-compose-staging.yml update'
  only:
    - dev

using from docker

docker run -it --rm lskjs/rsync bash

supported tags and respective Dockerfile links

About

Little docker image based on alpine with ssh-client and bash

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 57.0%
  • Dockerfile 43.0%