Code Monkey home page Code Monkey logo

multistage-docker-examples's Introduction

multistage-docker-examples

Examples of how to use multistage docker builds to construct small production images

These examples are from the blog post All the small things.

Python

Here we have a minimal Flask application.

Building

Thicc:

$ cd python-example
$ docker build -t python-thicc -f Dockerfile_thicc .

Slim:

$ cd python-example
$ docker build -t python-slim -f Dockerfile_slim .

Running

Thicc:

$ docker run --rm -p 4000:4000 python-thicc

Slim:

$ docker run --rm -p 4000:4000 python-slim

Java

A Spring Boot HTTP JSON API generated from the Petstore Swagger example and modified to use Java 11.

Building

Thicc:

$ cd java-example
$ docker build -t java-thicc -f Dockerfile_thicc .

Slim:

$ cd java-example
$ docker build -t java-slim -f Dockerfile_slim .

Running

Thicc:

$ docker run --rm -p 8080:8080 java-thicc

Slim:

$ docker run --rm -p 8080:8080 java-slim

Go

A HTTP JSON API generated from the Petstore Swagger example.

Building

Thicc:

$ cd go-example
$ docker build -t go-thicc -f Dockerfile_thicc .

Slim:

$ cd go-example
$ docker build -t go-slim -f Dockerfile_slim .

Running

Thicc:

$ docker run --rm -p 5000:5000 go-slim

Slim:

$ docker run --rm -p 5000:5000 go-slim

Javascript

A React-based, single-page web application.

Building

Thicc:

$ cd js-example
$ docker build -t js-thicc -f Dockerfile_thicc .

Slim:

$ cd js-example
$ docker build -t js-slim -f Dockerfile_slim .

Running

Thicc:

$ docker run --rm -p 5000:5000 js-thicc

Slim:

$ docker run --rm -p 5000:80 js-slim

multistage-docker-examples's People

Contributors

jhh3 avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.