If you don't have an app to deploy but would like to try out Dockerfile Deploy, here's an example.
First, create a new app on Aptible.
Note the Git Remote that is provided. Going forward in this article, we'll refer to it as
Next, create a new empty git repository on your local workstation:
git init test-dockerfile-deploy cd test-dockerfile-deploy
Then, add a new Dockerfile in the root of the repository, with the following contents:
# Declare a base image: FROM alpine # Tell Aptible Deploy this app will be accessible over port 80: EXPOSE 80 # Tell Aptible Deploy to run "httpd -f" to start this app: CMD ["httpd", "-f"]
Finally, deploy to Aptible Deploy:
# Commit the Dockerfile git add Dockerfile git commit -m "Add a Dockerfile" # This URL is available in the Aptible Dashboard under "Git Remote". # You got it after creating your app. git remote add aptible "$GIT_URL" # Push to Aptible Deploy git push aptible master
This will deploy a basic image based on Alpine Linux running a HTTP server.
Updated about a month ago