Coder Social home page Coder Social logo

cameronbroe / my-dockerfile-templates Goto Github PK

View Code? Open in Web Editor NEW
1.0 3.0 0.0 74 KB

Just my collection of Dockerfile templates for various language environments

License: MIT License

Dockerfile 33.68% Go 1.23% JavaScript 0.49% Python 0.84% Ruby 2.79% Crystal 0.35% Rust 0.76% CMake 5.08% C 1.60% C++ 1.88% C# 1.48% Java 1.77% Swift 16.19% Shell 31.12% Raku 0.34% Julia 0.40%
dockerfile examples templates

my-dockerfile-templates's Introduction

my-dockerfile-templates Contributor Covenant

Just my collection of Dockerfile templates for various language environments. There is a particular emphasis in simplicity with these Dockerfiles. Each one should be a simple "Hello, world!" for that given language's environment. They should be able to be copied over to your project with minimal changes needed to get you up and running.

This README assumes you have installed Docker for your platform through their suggested instructions.

Languages

Building images

Each language environment's Dockerfile is in its own directory in this repo. To start working with that environment, you should cd into its directory

To build the image, run the following command:

docker build -t my-dockerfile-template .

This will build an image with the tag my-dockerfile-template and store it in your local Docker registry. This image could be pushed up to a public registry such as Docker Hub or GitHub Container Registry if you wished.

Running images

Assuming you used the tag name above, you can simply run the following command to run the image that was created:

docker run --rm -t my-dockerfile-template

Running tests

The tests are entirely contained within run_tests.sh. As on as Docker is set up on your system and in your PATH, just run the tests with the command:

./run_tests.sh

These tests are also ran on PRs to main as well as pushes to main through GitHub Actions.

Contributing

I am open to contributions with improvements and new languages/environments. New languages/environments should be automatically tested by run_tests.sh and pass in CI before I will merge them in. In general, please strive to keep these templates as simple as possible. However, if the language is one with build artifacts (e.g C++, Rust, Golang), I do think a multi-stage build approach is appropriate. If you are unfamiliar with multi-stage builds, refer to Docker's documentation.

my-dockerfile-templates's People

Contributors

cameronbroe avatar dependabot[bot] avatar

Stargazers

 avatar

Watchers

 avatar  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.