Migrate from Dockerfile Deploy to Direct Docker Image Deploy
If you are currently using Dockerfile Deploy and would like to migrate to a Direct Docker Image Deploy, use the following instructions:
- If you have a
.aptible.ymlfile in your repository, you must embed it in your Docker image. To do so, follow the instructions at Procfiles and
.aptible.ymlwith Direct Docker Image Deploy.
- If you modified your image to add the
.aptible.yml, rebuild your image and push it again.
- Deploy using
aptible deployas documented in Using
aptible deploy, with one exception: the first time you deploy (you don't need to do it again), add the
--git-detachflag to this command. Adding the
--git-detachflag ensures Aptible ignores your app's Companion Git Repository in the future.
What if you don't add
If you don't add the
--git-detach flag, Aptible will fall back to a deprecated mode of operation called Companion Git Repository.
In this mode, Aptible uses the
.aptible.yml from your Git repository, if any, and ignores everything else (e.g.,
Dockerfile, source code). Aptible deploys your Docker Image directly instead. Because of this behavior, using this mode of operation isn't recommended. Instead, embed your
.aptible.yml in your Docker Image, and add the
--git-detach flag to disable the Companion Git Repository.