Giter Club home page Giter Club logo

self-docker-action's Introduction

Self local Docker image build

Motivation: what this action is designed for

Ease the building of a local docker image for nested docker in a github action workflow

I often found myself writing this kind of steps in a CI action description:

<...>
- name: build test-one image
  run: docker build -t test:one ./tests/test-one-image-dir

- name: run test-one
  run: docker run --rm test:one java -jar app.jar arg1 arg2 arg3 

This action aims to normalize the build phase. A secondary goal is to add some validations tests like those performed by GoogleContainerTools/container-structure-test

Non-motivation: what this action is not designed for

  • Logging to a custom repository
  • Publishing the built images

Supported architecture

This action is tested on ubuntu-latest and windows-latest. NB: It is not possible to cross-build images, e.g. a windows runner can only build windows-based images.

Usage

    steps:
      - name: Checkout # Do not forget to checkout your repository ...
        uses: actions/checkout@v3

      - name: Build image
        uses: NyuB/[email protected]
        with:
          build-dir: ./images/dev-env # relative to root of repository
          image-name: dev
          image-tag: latest
          dockerfile-path: ./images/Dockerfile # optional, (defaults to <build-dir>/Dockerfile)
      
      - name: Use image
        run: docker run --rm dev:latest echo "BRAVO" # image available under <image-name>:<image-tag>

self-docker-action's People

Contributors

nyub avatar

Stargazers

George avatar

Watchers

 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.