Migrate from Direct Docker Image Deploy to Dockerfile Deploy
Suppose you configured your app to use Direct Docker Image Deploy, i.e., you deployed using
aptible deploy in the past, and you want to switch to Dockerfile Deploy instead. In that case, you will need to take the following steps:
Step 1: Push your git repository to a temporary branch. This action will not trigger a deploy, but we'll use it in just a moment:
BRANCH="deploy-$(date "+%s")" git push aptible "master:$BRANCH"
Step 2: Deploy the temporary branch (using the
--git-commitish argument), and use an empty string for the
--docker-image argument to disable Direct Docker Image Deploy.
aptible deploy --app "$APP_HANDLE" \ --git-commitish "$BRANCH" \ --docker-image ""
Step 3: Use
git push aptible master for all deploys moving forward.
Please note if your app has Private Registry Credentials, Aptible will attempt to log in using these credentials. Unless the app uses a private base image in its Dockerfile, these credentials should not be necessary. To prevent private registry authentication, unset the credentials when deploying:
aptible deploy --app "$APP_HANDLE" \ --git-commitish "$BRANCH" \ --docker-image "" \ --private-registry-username "" \ --private-registry-password ""
Congratulations! You are now set to use Dockerfile deploy.