Sign inSign up

flitter/buildstep

By flitter

•Updated almost 11 years ago

Image
0

259

flitter/buildstep repository overview

⁠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!

Tag summary

Content type

Image

Digest

sha256:fbd847bfd…

Size

333.2 MB

Last updated

almost 11 years ago

docker pull flitter/buildstep