Insta Docker

create and run a docker container instantly

License

License

Categories

Categories

Docker Container Virtualization Tools
GroupId

GroupId

com.github.lkq
ArtifactId

ArtifactId

insta-docker
Last Version

Last Version

0.2.3
Release Date

Release Date

Type

Type

jar
Description

Description

Insta Docker
create and run a docker container instantly
Project URL

Project URL

https://github.com/lkq/insta-docker
Source Code Management

Source Code Management

https://github.com/lkq/insta-docker

Download insta-docker

How to add to project

<!-- https://jarcasting.com/artifacts/com.github.lkq/insta-docker/ -->
<dependency>
    <groupId>com.github.lkq</groupId>
    <artifactId>insta-docker</artifactId>
    <version>0.2.3</version>
</dependency>
// https://jarcasting.com/artifacts/com.github.lkq/insta-docker/
implementation 'com.github.lkq:insta-docker:0.2.3'
// https://jarcasting.com/artifacts/com.github.lkq/insta-docker/
implementation ("com.github.lkq:insta-docker:0.2.3")
'com.github.lkq:insta-docker:jar:0.2.3'
<dependency org="com.github.lkq" name="insta-docker" rev="0.2.3">
  <artifact name="insta-docker" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.github.lkq', module='insta-docker', version='0.2.3')
)
libraryDependencies += "com.github.lkq" % "insta-docker" % "0.2.3"
[com.github.lkq/insta-docker "0.2.3"]

Dependencies

compile (2)

Group / Artifact Type Version
com.github.docker-java : docker-java jar 3.1.1
com.google.code.gson : gson jar 2.8.5

test (8)

Group / Artifact Type Version
org.junit.jupiter : junit-jupiter-api jar 5.1.0
org.junit.jupiter : junit-jupiter-engine jar 5.1.0
org.mockito : mockito-core jar 2.21.0
org.mockito : mockito-junit-jupiter jar 2.21.0
ch.qos.logback : logback-classic jar 1.2.3
javax.activation : activation jar 1.1
org.postgresql : postgresql jar 42.2.5
mysql : mysql-connector-java jar 8.0.13

Project Modules

There are no modules declared in this project.

Insta Docker

a wrapper over docker-java api to startup a local db docker container for testing

Build Status

Dependency

<dependency>
    <groupId>com.github.lkq</groupId>
    <artifactId>insta-docker</artifactId>
    <version>0.1.4</version>
</dependency>

Usage

Setup

instaDocker = new InstaDocker("postgres:latest", "insta-pg-container")
        .dockerClient(DockerClientFactory.defaultClient())
        .dockerLogger(dockerLogger)
        .init();

int hostPort = PortFinder.find();
instaDocker.container().bindPort(5432, hostPort, InternetProtocol.TCP)
                        .environmentVariables(Arrays.asList("POSTGRES_PASSWORD=password01"));

instaDocker.start(true, 60);

Connect

connection = DriverManager.getConnection("jdbc:postgresql://localhost:" + hostPort + "/", "postgres", "password01");

Versions

Version
0.2.3
0.2.0
0.1.6