Public | Automated Build

Last pushed: 2 years ago
Short Description
Short description is empty for this repo.
Full Description

flitter/buildstep

Base docker image to create containers from app code using Heroku's buildpacks.

Supported languages

  • Multi-buildpack
  • Ruby
  • Node.js
  • Clojure
  • Python
  • Java
  • Gradle
  • Grails
  • Scala
  • Play
  • PHP
  • Go

Usage

Create a Dockerfile similar to the following in your application code folder
(this example is for a typical Django app):

FROM flitter/buildstep
EXPOSE 80
CMD ["python", "manage.py", "runserver", "80"]

Modify the EXPOSE and CMD directives with the port to be exposed
and the command used to launch your application respectively.

Then, execute the following to build the image:

docker build -t myuser/myapp .

This will create an image named myuser/myapp with your application ready to go.
To launch it, just type:

docker run -d -p 80 myuser/myapp

Easy!

Usage with Procfile

If you have already defined a Procfile
(https://devcenter.heroku.com/articles/procfile) like the following:

web: python manage.py runserver $PORT

you can use it by defining the following Dockerfile instead:

FROM flitter/buildstep
EXPOSE 80
ENV PORT 80
CMD ["/start", "web"]

Modify the EXPOSE and CMD directives with the port to be exposed and the process
type defined in the Procfile used to launch your application respectively.

It also works if you don't have a Procfile

Then, execute the following to build the image:

docker build -t myuser/myapp .
docker run -d -p 80 myuser/myapp

Done!

Docker Pull Command
Owner
flitter
Source Repository

Comments (0)