npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@ebizbase/nx-docker

v3.0.0

Published

The nx plugin build, push containers and analyze images from your applications

Downloads

825

Readme

nx-docker

The NX plugin to build, push containers, and analyze images from your applications

Prerequisites

  • Ensure you have Docker installed and running on your machine.
  • Ensure you have NX installed in your workspace.

Installation

To install plugin run the following command:

npm install -D @ebizbase/nx-docker
yarn add -D @ebizbase/nx-docker
pnpm add -D @ebizbase/nx-docker

Build image

Note: Docker have been deprecated docker build which requires the Buildx component to build images with BuildKit. So from now on we will not support docker build related issues. And in the future we will require buildx to be installed.

Bellow config simple build docker image and load it in local registry. You can see image with docker image ls after build.

{
  "targets": {
    "build": {
      "executor": "@ebizbase/nx-docker:build",
      "options": {
        "tags": ["your-app:latest"],
        "outputs": ["type=image"]
      }
    }
  }
}

If you want to build and push image let referance bellow example

{
  "targets": {
    "build": {
      "executor": "@ebizbase/nx-docker:build",
      "options": {
        "tags": ["docker.io/org/your-app:latest", "ghcr.io/ogr/your-app:latest"],
        "outputs": ["type=registry"]
      }
    }
  }
}

Let's see more about docker buildx build output options

Bellow is all options of @ebizbase/nx-docker:build

| Property | Type | Description | Default | Required | | ------------ | -------- | -------------------------------------------------------------------------- | ------- | -------- | | ci | boolean | Run in CI mode | false | No | | outputs | string[] | The output of the build | | No | | args | string[] | The arguments to pass to the docker build command | | No | | file | string | The dockerfile to use for building the image | | No | | context | string | The context to use for building the image | | No | | tags | string[] | The tag of the image to build | | Yes | | addHost | string[] | Add a custom host-to-IP mapping (host:ip) | | No | | allow | string[] | Allow extra privileged entitlement (e.g., network.host, security.insecure) | | No | | annotation | string[] | Set metadata for an image | | No | | attest | string[] | Attest the image with an attestation provider | | No | | cacheFrom | string[] | Images to consider as cache sources | | No | | cacheTo | string[] | Images to consider as cache destinations | | No | | shm-size | string | Size of /dev/shm | | No | | target | string | Set the target build stage to build | | No | | ulimit | string[] | Ulimit options | | No | | platform | string[] | Set the target platform for the build | | No | | ulimit | string[] | The metadata will be written as a JSON object to the specified file. | | No |

shm-size and ulimit are only available using moby/buildkit:master as builder image atm:

- name: Set up Docker Buildx
  uses: docker/setup-buildx-action@v1
  with:
  driver-opts: |
    image=moby/buildkit:master

To check all possible options please check this schema.json file

License

This project is licensed under the MIT License.