0.3.11-beta.4 • Published 6 months ago

docker-bun v0.3.11-beta.4

Weekly downloads
-
License
MIT
Repository
github
Last release
6 months ago

docker-bun

Getting Started

this project was made because no existing node docker packages work in bun

The docker Api specification was used to generate the API

To install dependencies:

bun add docker-bun

Usage

import { Docker } from 'docker-bun'

const docker = new Docker()
// or

const docker = new Docker(opts)

// get all containers
const containers = await docker.container.containerList()

Caveats

This uses bun to connect to dockers unix socket

other methods have not been sought out yet

Currently the only configuration is

export interface OpenAPIConfig {
  BASE: string
  VERSION: string
  WITH_CREDENTIALS: boolean
  CREDENTIALS: 'include' | 'omit' | 'same-origin'
  TOKEN?: string | Resolver<string> | undefined
  USERNAME?: string | Resolver<string> | undefined
  PASSWORD?: string | Resolver<string> | undefined
  HEADERS?: Headers | Resolver<Headers> | undefined
  ENCODE_PATH?: ((path: string) => string) | undefined
};

export const OpenAPI: OpenAPIConfig = {
  BASE: '/v1.43',
  VERSION: '1.43',
  WITH_CREDENTIALS: false,
  CREDENTIALS: 'include',
  TOKEN: undefined,
  USERNAME: undefined,
  PASSWORD: undefined,
  HEADERS: undefined,
  ENCODE_PATH: undefined,
}

// new Docker(OpenAPI)
0.3.11-beta.4

6 months ago

0.3.11-beta.3

6 months ago

0.3.11-beta.2

6 months ago

0.3.11-beta.1

6 months ago

0.3.11-beta.0

6 months ago

0.3.10

6 months ago

0.3.10-beta.0

6 months ago

0.3.9

6 months ago

0.3.8

6 months ago

0.3.7

6 months ago

0.3.6

6 months ago

0.3.0

6 months ago

0.2.0

6 months ago

0.1.0

6 months ago