diff --git a/src/main/java/com/github/dockerjava/api/command/GraphDriver.java b/src/main/java/com/github/dockerjava/api/command/GraphDriver.java new file mode 100644 index 000000000..6285195c4 --- /dev/null +++ b/src/main/java/com/github/dockerjava/api/command/GraphDriver.java @@ -0,0 +1,76 @@ +package com.github.dockerjava.api.command; + +import com.fasterxml.jackson.annotation.JsonProperty; +import org.apache.commons.lang.builder.EqualsBuilder; +import org.apache.commons.lang.builder.HashCodeBuilder; +import org.apache.commons.lang.builder.ToStringBuilder; + +import javax.annotation.CheckForNull; + +/** + * Part of {@link InspectImageResponse} + * + * @author Kanstantsin Shautsou + * @since {@link com.github.dockerjava.core.RemoteApiVersion#VERSION_1_21} + */ +public class GraphDriver { + /** + * @since {@link com.github.dockerjava.core.RemoteApiVersion#VERSION_1_21} + */ + @JsonProperty("Name") + private String name; + + /** + * @since {@link com.github.dockerjava.core.RemoteApiVersion#VERSION_1_21} + */ + @JsonProperty("Data") + private String data; + + + /** + * @see #data + */ + @CheckForNull + public String getData() { + return data; + } + + /** + * @see #data + */ + public GraphDriver withData(String data) { + this.data = data; + return this; + } + + /** + * @see #name + */ + @CheckForNull + public String getName() { + return name; + } + + /** + * @see #name + */ + public GraphDriver withName(String name) { + this.name = name; + return this; + } + + @Override + public String toString() { + return ToStringBuilder.reflectionToString(this); + } + + @Override + public boolean equals(Object o) { + return EqualsBuilder.reflectionEquals(this, o); + } + + @Override + public int hashCode() { + return HashCodeBuilder.reflectionHashCode(this); + } +} diff --git a/src/main/java/com/github/dockerjava/api/command/InspectImageResponse.java b/src/main/java/com/github/dockerjava/api/command/InspectImageResponse.java index db9184c6d..740a1b832 100644 --- a/src/main/java/com/github/dockerjava/api/command/InspectImageResponse.java +++ b/src/main/java/com/github/dockerjava/api/command/InspectImageResponse.java @@ -1,11 +1,16 @@ package com.github.dockerjava.api.command; +import org.apache.commons.lang.builder.EqualsBuilder; +import org.apache.commons.lang.builder.HashCodeBuilder; import org.apache.commons.lang.builder.ToStringBuilder; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; import com.github.dockerjava.api.model.ContainerConfig; +import javax.annotation.CheckForNull; +import java.util.List; + /** * * @author Konstantin Pelykh (kpelykh@gmail.com) @@ -50,56 +55,292 @@ public class InspectImageResponse { @JsonProperty("Size") private Long size; - public String getId() { - return id; + @JsonProperty("RepoTags") + private List repoTags; + + @JsonProperty("RepoDigests") + private List repoDigests; + + /** + * @since {@link com.github.dockerjava.core.RemoteApiVersion#VERSION_1_21} + */ + @JsonProperty("VirtualSize") + private Long virtualSize; + + /** + * @since {@link com.github.dockerjava.core.RemoteApiVersion#VERSION_1_21} + */ + @JsonProperty("GraphDriver") + private GraphDriver graphDriver; + + /** + * @see #arch + */ + @CheckForNull + public String getArch() { + return arch; } - public String getParent() { - return parent; + /** + * @see #arch + */ + public InspectImageResponse withArch(String arch) { + this.arch = arch; + return this; } - public String getCreated() { - return created; + /** + * @see #author + */ + @CheckForNull + public String getAuthor() { + return author; + } + + /** + * @see #author + */ + public InspectImageResponse withAuthor(String author) { + this.author = author; + return this; + } + + /** + * @see #comment + */ + @CheckForNull + public String getComment() { + return comment; + } + + /** + * @see #comment + */ + public InspectImageResponse withComment(String comment) { + this.comment = comment; + return this; + } + + /** + * @see #config + */ + @CheckForNull + public ContainerConfig getConfig() { + return config; } + /** + * @see #config + */ + public InspectImageResponse withConfig(ContainerConfig config) { + this.config = config; + return this; + } + + /** + * @see #container + */ + @CheckForNull public String getContainer() { return container; } + /** + * @see #container + */ + public InspectImageResponse withContainer(String container) { + this.container = container; + return this; + } + + /** + * @see #containerConfig + */ + @CheckForNull public ContainerConfig getContainerConfig() { return containerConfig; } - public Long getSize() { - return size; + /** + * @see #containerConfig + */ + public InspectImageResponse withContainerConfig(ContainerConfig containerConfig) { + this.containerConfig = containerConfig; + return this; } - public String getDockerVersion() { - return dockerVersion; + /** + * @see #created + */ + @CheckForNull + public String getCreated() { + return created; } - public ContainerConfig getConfig() { - return config; + /** + * @see #created + */ + public InspectImageResponse withCreated(String created) { + this.created = created; + return this; } - public String getArch() { - return arch; + /** + * @see #dockerVersion + */ + @CheckForNull + public String getDockerVersion() { + return dockerVersion; } - public String getComment() { - return comment; + /** + * @see #dockerVersion + */ + public InspectImageResponse withDockerVersion(String dockerVersion) { + this.dockerVersion = dockerVersion; + return this; } - public String getAuthor() { - return author; + /** + * @see #id + */ + @CheckForNull + public String getId() { + return id; } + /** + * @see #id + */ + public InspectImageResponse withId(String id) { + this.id = id; + return this; + } + + /** + * @see #os + */ + @CheckForNull public String getOs() { return os; } + /** + * @see #os + */ + public InspectImageResponse withOs(String os) { + this.os = os; + return this; + } + + /** + * @see #parent + */ + @CheckForNull + public String getParent() { + return parent; + } + + /** + * @see #parent + */ + public InspectImageResponse withParent(String parent) { + this.parent = parent; + return this; + } + + /** + * @see #repoTags + */ + @CheckForNull + public List getRepoTags() { + return repoTags; + } + + /** + * @see #repoTags + */ + public InspectImageResponse withRepoTags(List repoTags) { + this.repoTags = repoTags; + return this; + } + + /** + * @see #size + */ + @CheckForNull + public Long getSize() { + return size; + } + + /** + * @see #size + */ + public InspectImageResponse withSize(Long size) { + this.size = size; + return this; + } + + /** + * @see #repoDigests + */ + @CheckForNull + public List getRepoDigests() { + return repoDigests; + } + + /** + * @see #repoDigests + */ + public InspectImageResponse withRepoDigests(List repoDigests) { + this.repoDigests = repoDigests; + return this; + } + + /** + * @see #graphDriver + */ + @CheckForNull + public GraphDriver getGraphDriver() { + return graphDriver; + } + + /** + * @see #graphDriver + */ + public InspectImageResponse withGraphDriver(GraphDriver graphDriver) { + this.graphDriver = graphDriver; + return this; + } + + /** + * @see #virtualSize + */ + @CheckForNull + public Long getVirtualSize() { + return virtualSize; + } + + /** + * @see #virtualSize + */ + public InspectImageResponse withVirtualSize(Long virtualSize) { + this.virtualSize = virtualSize; + return this; + } + @Override public String toString() { return ToStringBuilder.reflectionToString(this); } + + @Override + public boolean equals(Object o) { + return EqualsBuilder.reflectionEquals(this, o); + } + + @Override + public int hashCode() { + return HashCodeBuilder.reflectionHashCode(this); + } } diff --git a/src/main/java/com/github/dockerjava/api/model/ContainerConfig.java b/src/main/java/com/github/dockerjava/api/model/ContainerConfig.java index d7f4b81ee..224da3272 100644 --- a/src/main/java/com/github/dockerjava/api/model/ContainerConfig.java +++ b/src/main/java/com/github/dockerjava/api/model/ContainerConfig.java @@ -1,19 +1,21 @@ package com.github.dockerjava.api.model; -import java.util.Map; - -import org.apache.commons.lang.builder.ToStringBuilder; - import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonInclude.Include; import com.fasterxml.jackson.annotation.JsonProperty; +import org.apache.commons.lang.builder.EqualsBuilder; +import org.apache.commons.lang.builder.HashCodeBuilder; +import org.apache.commons.lang.builder.ToStringBuilder; + +import javax.annotation.CheckForNull; +import java.util.Map; /** + * Used as part of 'images/IMAGE/someimage' response. * * @author Konstantin Pelykh (kpelykh@gmail.com) - * */ @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(Include.NON_NULL) @@ -87,88 +89,346 @@ public ExposedPort[] getExposedPorts() { return exposedPorts != null ? exposedPorts.getExposedPorts() : null; } - public Boolean isNetworkDisabled() { - return networkDisabled; + /** + * @see #attachStderr + */ + @CheckForNull + public Boolean getAttachStderr() { + return attachStderr; } + /** + * @see #attachStderr + */ + public ContainerConfig withAttachStderr(Boolean attachStderr) { + this.attachStderr = attachStderr; + return this; + } + + /** + * @see #attachStdin + */ + @CheckForNull + public Boolean getAttachStdin() { + return attachStdin; + } + + /** + * @see #attachStdin + */ + public ContainerConfig withAttachStdin(Boolean attachStdin) { + this.attachStdin = attachStdin; + return this; + } + + /** + * @see #attachStdout + */ + @CheckForNull + public Boolean getAttachStdout() { + return attachStdout; + } + + /** + * @see #attachStdout + */ + public ContainerConfig withAttachStdout(Boolean attachStdout) { + this.attachStdout = attachStdout; + return this; + } + + /** + * @see #cmd + */ + @CheckForNull + public String[] getCmd() { + return cmd; + } + + /** + * @see #cmd + */ + public ContainerConfig withCmd(String[] cmd) { + this.cmd = cmd; + return this; + } + + /** + * @see #domainName + */ + @CheckForNull public String getDomainName() { return domainName; } - public String getWorkingDir() { - return workingDir; + /** + * @see #domainName + */ + public ContainerConfig withDomainName(String domainName) { + this.domainName = domainName; + return this; + } + + /** + * @see #entrypoint + */ + @CheckForNull + public String[] getEntrypoint() { + return entrypoint; + } + + /** + * @see #entrypoint + */ + public ContainerConfig withEntrypoint(String[] entrypoint) { + this.entrypoint = entrypoint; + return this; + } + + /** + * @see #env + */ + @CheckForNull + public String[] getEnv() { + return env; } + /** + * @see #env + */ + public ContainerConfig withEnv(String[] env) { + this.env = env; + return this; + } + + /** + * @see #exposedPorts + */ + public ContainerConfig withExposedPorts(ExposedPorts exposedPorts) { + this.exposedPorts = exposedPorts; + return this; + } + + /** + * @see #hostName + */ + @CheckForNull public String getHostName() { return hostName; } - public String[] getPortSpecs() { - return portSpecs; + /** + * @see #hostName + */ + public ContainerConfig withHostName(String hostName) { + this.hostName = hostName; + return this; } - public String getUser() { - return user; + /** + * @see #image + */ + @CheckForNull + public String getImage() { + return image; } - public Boolean isTty() { - return tty; + /** + * @see #image + */ + public ContainerConfig withImage(String image) { + this.image = image; + return this; } - public Boolean isStdinOpen() { - return stdinOpen; + /** + * @see #labels + */ + @CheckForNull + public Map getLabels() { + return labels; } - public Boolean isStdInOnce() { - return stdInOnce; + /** + * @see #labels + */ + public ContainerConfig withLabels(Map labels) { + this.labels = labels; + return this; } + /** + * @see #macAddress + */ + @CheckForNull public String getMacAddress() { return macAddress; } - public Boolean isAttachStdin() { - return attachStdin; + /** + * @see #macAddress + */ + public ContainerConfig withMacAddress(String macAddress) { + this.macAddress = macAddress; + return this; } - public Boolean isAttachStdout() { - return attachStdout; + /** + * @see #networkDisabled + */ + @CheckForNull + public Boolean getNetworkDisabled() { + return networkDisabled; } - public Boolean isAttachStderr() { - return attachStderr; + /** + * @see #networkDisabled + */ + public ContainerConfig withNetworkDisabled(Boolean networkDisabled) { + this.networkDisabled = networkDisabled; + return this; } - public String[] getEnv() { - return env; + /** + * @see #onBuild + */ + @CheckForNull + public String[] getOnBuild() { + return onBuild; } - public String[] getCmd() { - return cmd; + /** + * @see #onBuild + */ + public ContainerConfig withOnBuild(String[] onBuild) { + this.onBuild = onBuild; + return this; } - public String getImage() { - return image; + /** + * @see #portSpecs + */ + @CheckForNull + public String[] getPortSpecs() { + return portSpecs; + } + + /** + * @see #portSpecs + */ + public ContainerConfig withPortSpecs(String[] portSpecs) { + this.portSpecs = portSpecs; + return this; + } + + /** + * @see #stdInOnce + */ + @CheckForNull + public Boolean getStdInOnce() { + return stdInOnce; } + /** + * @see #stdInOnce + */ + public ContainerConfig withStdInOnce(Boolean stdInOnce) { + this.stdInOnce = stdInOnce; + return this; + } + + /** + * @see #stdinOpen + */ + @CheckForNull + public Boolean getStdinOpen() { + return stdinOpen; + } + + /** + * @see #stdinOpen + */ + public ContainerConfig withStdinOpen(Boolean stdinOpen) { + this.stdinOpen = stdinOpen; + return this; + } + + /** + * @see #tty + */ + @CheckForNull + public Boolean getTty() { + return tty; + } + + /** + * @see #tty + */ + public ContainerConfig withTty(Boolean tty) { + this.tty = tty; + return this; + } + + /** + * @see #user + */ + @CheckForNull + public String getUser() { + return user; + } + + /** + * @see #user + */ + public ContainerConfig withUser(String user) { + this.user = user; + return this; + } + + /** + * @see #volumes + */ + @CheckForNull public Map getVolumes() { return volumes; } - public String[] getEntrypoint() { - return entrypoint; + /** + * @see #volumes + */ + public ContainerConfig withVolumes(Map volumes) { + this.volumes = volumes; + return this; } - public String[] getOnBuild() { - return onBuild; + /** + * @see #workingDir + */ + @CheckForNull + public String getWorkingDir() { + return workingDir; } - public Map getLabels() { - return labels; + /** + * @see #workingDir + */ + public ContainerConfig withWorkingDir(String workingDir) { + this.workingDir = workingDir; + return this; } @Override public String toString() { return ToStringBuilder.reflectionToString(this); } + + @Override + public boolean equals(Object o) { + return EqualsBuilder.reflectionEquals(this, o); + } + + @Override + public int hashCode() { + return HashCodeBuilder.reflectionHashCode(this); + } } diff --git a/src/test/java/com/github/dockerjava/api/command/InspectImageResponseTest.java b/src/test/java/com/github/dockerjava/api/command/InspectImageResponseTest.java new file mode 100644 index 000000000..0df990d00 --- /dev/null +++ b/src/test/java/com/github/dockerjava/api/command/InspectImageResponseTest.java @@ -0,0 +1,163 @@ +package com.github.dockerjava.api.command; + +import com.fasterxml.jackson.databind.JavaType; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.github.dockerjava.api.model.ContainerConfig; +import org.testng.annotations.Test; + +import java.io.IOException; +import java.util.Collections; + +import static com.github.dockerjava.core.RemoteApiVersion.VERSION_1_22; +import static com.github.dockerjava.test.serdes.JSONSamples.testRoundTrip; +import static org.hamcrest.MatcherAssert.assertThat; +import static org.hamcrest.Matchers.contains; +import static org.hamcrest.Matchers.containsInAnyOrder; +import static org.hamcrest.Matchers.equalTo; +import static org.hamcrest.Matchers.hasItem; +import static org.hamcrest.Matchers.hasSize; +import static org.hamcrest.Matchers.is; +import static org.hamcrest.Matchers.isEmptyString; +import static org.hamcrest.Matchers.notNullValue; +import static org.hamcrest.Matchers.nullValue; + +/** + * @author Kanstantsin Shautsou + */ +public class InspectImageResponseTest { + @Test + public void serder1_22Json() throws IOException { + final ObjectMapper mapper = new ObjectMapper(); + final JavaType type = mapper.getTypeFactory().constructType(InspectImageResponse.class); + + final InspectImageResponse inspectImage = testRoundTrip(VERSION_1_22, + "images/image1/inspect1.json", + type + ); + + final ContainerConfig config = new ContainerConfig() + .withAttachStderr(false) + .withAttachStdin(false) + .withAttachStdout(false) + .withCmd(null) + .withDomainName("") + .withEntrypoint(null) + .withEnv(new String[]{"HOME=/", "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"}) + .withExposedPorts(null) + .withHostName("aee9ba801acc") + .withImage("511136ea3c5a64f264b78b5433614aec563103b4d4702f3ba7d4d2698e22c158") + .withLabels(null) + .withMacAddress(null) + .withNetworkDisabled(null) + .withOnBuild(new String[]{}) + .withStdinOpen(false) + .withPortSpecs(null) + .withStdInOnce(false) + .withTty(false) + .withUser("") + .withVolumes(null) + .withWorkingDir(""); + + final ContainerConfig containerConfig = new ContainerConfig() + .withAttachStderr(false) + .withAttachStdin(false) + .withAttachStdout(false) + .withCmd(new String[]{"/bin/sh", "-c", "#(nop) MAINTAINER hack@worldticket.net"}) + .withDomainName("") + .withEntrypoint(null) + .withEnv(new String[]{"HOME=/", "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"}) + .withExposedPorts(null) + .withHostName("aee9ba801acc") + .withImage("511136ea3c5a64f264b78b5433614aec563103b4d4702f3ba7d4d2698e22c158") + .withLabels(null) + .withMacAddress(null) + .withNetworkDisabled(null) + .withOnBuild(new String[]{}) + .withStdinOpen(false) + .withPortSpecs(null) + .withStdInOnce(false) + .withTty(false) + .withUser("") + .withVolumes(null) + .withWorkingDir(""); + + assertThat(inspectImage, notNullValue()); + assertThat(inspectImage.getArch(), is("amd64")); + assertThat(inspectImage.getAuthor(), is("hack@worldticket.net")); + assertThat(inspectImage.getComment(), isEmptyString()); + + assertThat(inspectImage.getConfig(), notNullValue()); + assertThat(inspectImage.getConfig(), equalTo(config)); + + assertThat(inspectImage.getCreated(), is("2014-04-29T19:59:10.84997669Z")); + assertThat(inspectImage.getContainer(), is("aee9ba801acca0e648ffd91df204ba82ae85d97608a4864a019e2004d7e1b133")); + + assertThat(inspectImage.getContainerConfig(), notNullValue()); + assertThat(inspectImage.getContainerConfig(), equalTo(containerConfig)); + + assertThat(inspectImage.getDockerVersion(), is("0.8.1")); + assertThat(inspectImage.getId(), is("sha256:ee45fe0d1fcdf1a0f9c2d1e36c6f4b3202bbb2032f14d7c9312b27bfcf6aee24")); + assertThat(inspectImage.getOs(), is("linux")); + assertThat(inspectImage.getParent(), isEmptyString()); + assertThat(inspectImage.getSize(), is(0L)); + + assertThat(inspectImage.getRepoTags(), hasSize(1)); + assertThat(inspectImage.getRepoTags(), hasItem("hackmann/empty:latest")); + + final GraphDriver aufsGraphDriver = new GraphDriver().withName("aufs"); + final GraphDriver graphDriver = inspectImage.getGraphDriver(); + assertThat(graphDriver, notNullValue()); + assertThat(graphDriver, equalTo(aufsGraphDriver)); + assertThat(graphDriver.getName(), is("aufs")); + assertThat(graphDriver.getData(), nullValue()); + + assertThat(inspectImage.getVirtualSize(), is(0L)); + + + final InspectImageResponse inspectImageResponse = new InspectImageResponse().withArch("amd64") + .withAuthor("hack@worldticket.net") + .withComment("") + .withConfig(config) + .withContainer("aee9ba801acca0e648ffd91df204ba82ae85d97608a4864a019e2004d7e1b133") + .withContainerConfig(containerConfig) + .withCreated("2014-04-29T19:59:10.84997669Z") + .withDockerVersion("0.8.1") + .withId("sha256:ee45fe0d1fcdf1a0f9c2d1e36c6f4b3202bbb2032f14d7c9312b27bfcf6aee24") + .withOs("linux") + .withParent("") + .withSize(0L) + .withRepoTags(Collections.singletonList("hackmann/empty:latest")) + .withRepoDigests(Collections.emptyList()) + .withVirtualSize(0L) + .withGraphDriver(aufsGraphDriver); + + assertThat(inspectImage, equalTo(inspectImageResponse)); + } + + + @Test + public void serder1_22_doc() throws IOException { + final ObjectMapper mapper = new ObjectMapper(); + final JavaType type = mapper.getTypeFactory().constructType(InspectImageResponse.class); + + final InspectImageResponse inspectImage = testRoundTrip(VERSION_1_22, + "images/docImage/doc.json", + type + ); + + assertThat(inspectImage, notNullValue()); + + assertThat(inspectImage.getRepoDigests(), hasSize(1)); + assertThat(inspectImage.getRepoDigests(), + contains("localhost:5000/test/busybox/example@" + + "sha256:cbbf2f9a99b47fc460d422812b6a5adff7dfee951d8fa2e4a98caa0382cfbdbf") + ); + + assertThat(inspectImage.getRepoTags(), hasSize(3)); + assertThat(inspectImage.getRepoTags(), containsInAnyOrder( + "example:1.0", + "example:latest", + "example:stable" + )); + } +} \ No newline at end of file diff --git a/src/test/resources/samples/1.22/images/docImage/doc.json b/src/test/resources/samples/1.22/images/docImage/doc.json new file mode 100644 index 000000000..4cbb269c4 --- /dev/null +++ b/src/test/resources/samples/1.22/images/docImage/doc.json @@ -0,0 +1,89 @@ +{ + "Id": "85f05633ddc1c50679be2b16a0479ab6f7637f8884e0cfe0f4d20e1ebb3d6e7c", + "Container": "cb91e48a60d01f1e27028b4fc6819f4f290b3cf12496c8176ec714d0d390984a", + "Comment": "", + "Os": "linux", + "Architecture": "amd64", + "Parent": "91e54dfb11794fad694460162bf0cb0a4fa710cfa3f60979c177d920813e267c", + "ContainerConfig": { + "Tty": false, + "Hostname": "e611e15f9c9d", + "Volumes": null, + "Domainname": "", + "AttachStdout": false, + "PublishService": "", + "AttachStdin": false, + "OpenStdin": false, + "StdinOnce": false, + "NetworkDisabled": false, + "OnBuild": [], + "Image": "91e54dfb11794fad694460162bf0cb0a4fa710cfa3f60979c177d920813e267c", + "User": "", + "WorkingDir": "", + "Entrypoint": null, + "MacAddress": "", + "AttachStderr": false, + "Labels": { + "com.example.license": "GPL", + "com.example.version": "1.0", + "com.example.vendor": "Acme" + }, + "Env": [ + "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" + ], + "ExposedPorts": null, + "Cmd": [ + "/bin/sh", + "-c", + "#(nop) LABEL com.example.vendor=Acme com.example.license=GPL com.example.version=1.0" + ] + }, + "DockerVersion": "1.9.0-dev", + "VirtualSize": 188359297, + "Size": 0, + "Author": "", + "Created": "2015-09-10T08:30:53.26995814Z", + "GraphDriver": { + "Name": "aufs", + "Data": null + }, + "RepoDigests": [ + "localhost:5000/test/busybox/example@sha256:cbbf2f9a99b47fc460d422812b6a5adff7dfee951d8fa2e4a98caa0382cfbdbf" + ], + "RepoTags": [ + "example:1.0", + "example:latest", + "example:stable" + ], + "Config": { + "Image": "91e54dfb11794fad694460162bf0cb0a4fa710cfa3f60979c177d920813e267c", + "NetworkDisabled": false, + "OnBuild": [], + "StdinOnce": false, + "PublishService": "", + "AttachStdin": false, + "OpenStdin": false, + "Domainname": "", + "AttachStdout": false, + "Tty": false, + "Hostname": "e611e15f9c9d", + "Volumes": null, + "Cmd": [ + "/bin/bash" + ], + "ExposedPorts": null, + "Env": [ + "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" + ], + "Labels": { + "com.example.vendor": "Acme", + "com.example.version": "1.0", + "com.example.license": "GPL" + }, + "Entrypoint": null, + "MacAddress": "", + "AttachStderr": false, + "WorkingDir": "", + "User": "" + } +} diff --git a/src/test/resources/samples/1.22/images/image1/inspect1.json b/src/test/resources/samples/1.22/images/image1/inspect1.json new file mode 100644 index 000000000..ef674df2b --- /dev/null +++ b/src/test/resources/samples/1.22/images/image1/inspect1.json @@ -0,0 +1,69 @@ +{ + "Id": "sha256:ee45fe0d1fcdf1a0f9c2d1e36c6f4b3202bbb2032f14d7c9312b27bfcf6aee24", + "RepoTags": [ + "hackmann/empty:latest" + ], + "RepoDigests": [], + "Parent": "", + "Comment": "", + "Created": "2014-04-29T19:59:10.84997669Z", + "Container": "aee9ba801acca0e648ffd91df204ba82ae85d97608a4864a019e2004d7e1b133", + "ContainerConfig": { + "Hostname": "aee9ba801acc", + "Domainname": "", + "User": "", + "AttachStdin": false, + "AttachStdout": false, + "AttachStderr": false, + "Tty": false, + "OpenStdin": false, + "StdinOnce": false, + "Env": [ + "HOME=/", + "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" + ], + "Cmd": [ + "/bin/sh", + "-c", + "#(nop) MAINTAINER hack@worldticket.net" + ], + "Image": "511136ea3c5a64f264b78b5433614aec563103b4d4702f3ba7d4d2698e22c158", + "Volumes": null, + "WorkingDir": "", + "Entrypoint": null, + "OnBuild": [], + "Labels": null + }, + "DockerVersion": "0.8.1", + "Author": "hack@worldticket.net", + "Config": { + "Hostname": "aee9ba801acc", + "Domainname": "", + "User": "", + "AttachStdin": false, + "AttachStdout": false, + "AttachStderr": false, + "Tty": false, + "OpenStdin": false, + "StdinOnce": false, + "Env": [ + "HOME=/", + "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" + ], + "Cmd": null, + "Image": "511136ea3c5a64f264b78b5433614aec563103b4d4702f3ba7d4d2698e22c158", + "Volumes": null, + "WorkingDir": "", + "Entrypoint": null, + "OnBuild": [], + "Labels": null + }, + "Architecture": "amd64", + "Os": "linux", + "Size": 0, + "VirtualSize": 0, + "GraphDriver": { + "Name": "aufs", + "Data": null + } +}