Socket
Socket
Sign inDemoInstall

@pulumi/docker

Package Overview
Dependencies
Maintainers
2
Versions
580
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@pulumi/docker

A Pulumi package for interacting with Docker in Pulumi programs


Version published
Weekly downloads
565K
decreased by-11.36%
Maintainers
2
Weekly downloads
 
Created

What is @pulumi/docker?

@pulumi/docker is an npm package that allows you to manage Docker resources using Pulumi, a modern infrastructure as code platform. With this package, you can define, deploy, and manage Docker containers, images, and networks programmatically using JavaScript, TypeScript, or other supported languages.

What are @pulumi/docker's main functionalities?

Building Docker Images

This feature allows you to build Docker images from a specified directory. The code sample demonstrates how to build an image from the './app' directory and tag it as 'my-repo/my-image:latest'.

const pulumi = require('@pulumi/pulumi');
const docker = require('@pulumi/docker');

const image = new docker.Image('my-image', {
  build: './app',
  imageName: 'my-repo/my-image:latest',
});

exports.imageName = image.imageName;

Running Docker Containers

This feature allows you to run Docker containers. The code sample demonstrates how to run a container from the 'my-repo/my-image:latest' image and map port 80 inside the container to port 8080 on the host.

const pulumi = require('@pulumi/pulumi');
const docker = require('@pulumi/docker');

const container = new docker.Container('my-container', {
  image: 'my-repo/my-image:latest',
  ports: [{ internal: 80, external: 8080 }],
});

exports.containerId = container.id;

Managing Docker Networks

This feature allows you to create and manage Docker networks. The code sample demonstrates how to create a custom Docker network named 'my-custom-network'.

const pulumi = require('@pulumi/pulumi');
const docker = require('@pulumi/docker');

const network = new docker.Network('my-network', {
  name: 'my-custom-network',
});

exports.networkName = network.name;

Other packages similar to @pulumi/docker

Keywords

FAQs

Package last updated on 25 Sep 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc