11package com .github .dockerjava .api .command ;
22
3- import java .io .File ;
4- import java .io .InputStream ;
5-
63import com .github .dockerjava .api .model .AuthConfigurations ;
74import com .github .dockerjava .api .model .BuildResponseItem ;
85
6+ import javax .annotation .CheckForNull ;
7+ import java .io .File ;
8+ import java .io .InputStream ;
9+ import java .net .URI ;
10+
911/**
10- *
1112 * Build an image from Dockerfile.
12- *
13+ * <p>
1314 * TODO: http://docs.docker.com/reference/builder/#dockerignore
1415 *
16+ * @see <a
17+ * href="https://docs.docker.com/reference/api/docker_remote_api_v1.20/#build-image-from-a-dockerfile">build-image-from-a-dockerfile</a>
1518 */
1619public interface BuildImageCmd extends AsyncDockerCmd <BuildImageCmd , BuildResponseItem > {
1720
18- public BuildImageCmd withTag ( String tag );
21+ // lib specific
1922
2023 public InputStream getTarInputStream ();
2124
25+ public AuthConfigurations getBuildAuthConfigs ();
26+
27+ // getters
28+
29+ /**
30+ * "t" in API
31+ */
32+ @ CheckForNull
2233 public String getTag ();
2334
35+ /**
36+ * "remote" in API
37+ */
38+ @ CheckForNull
39+ public URI getRemote ();
40+
41+ /**
42+ * "nocache" in API
43+ */
2444 public boolean hasNoCacheEnabled ();
2545
46+ /**
47+ * "rm" in API
48+ */
2649 public boolean hasRemoveEnabled ();
2750
51+ /**
52+ * "forcerm" in API
53+ */
54+ public boolean isForcerm ();
55+
56+ @ CheckForNull
57+ public Boolean getForcerm ();
58+
59+ /**
60+ * "q" in API
61+ */
2862 public boolean isQuiet ();
2963
64+ /**
65+ * "pull" in API
66+ */
3067 public boolean hasPullEnabled ();
3168
69+ @ CheckForNull
3270 public String getPathToDockerfile ();
3371
34- public AuthConfigurations getBuildAuthConfigs ();
72+ @ CheckForNull
73+ public Long getMemory ();
74+
75+ @ CheckForNull
76+ public Long getMemswap ();
77+
78+ @ CheckForNull
79+ public String getCpushares ();
80+
81+ @ CheckForNull
82+ public String getCpusetcpus ();
83+
84+ // setters
85+
86+ public BuildImageCmd withTag (String tag );
87+
88+ public BuildImageCmd withRemote (URI remote );
3589
3690 public BuildImageCmd withBaseDirectory (File baseDirectory );
3791
3892 public BuildImageCmd withDockerfile (File dockerfile );
3993
40- public BuildImageCmd withTarInputStream (InputStream tarInputStream );
41-
4294 public BuildImageCmd withNoCache ();
4395
4496 public BuildImageCmd withNoCache (boolean noCache );
@@ -47,6 +99,10 @@ public interface BuildImageCmd extends AsyncDockerCmd<BuildImageCmd, BuildRespon
4799
48100 public BuildImageCmd withRemove (boolean rm );
49101
102+ public BuildImageCmd withForcerm ();
103+
104+ public BuildImageCmd withForcerm (Boolean forcerm );
105+
50106 public BuildImageCmd withQuiet ();
51107
52108 public BuildImageCmd withQuiet (boolean quiet );
@@ -55,8 +111,20 @@ public interface BuildImageCmd extends AsyncDockerCmd<BuildImageCmd, BuildRespon
55111
56112 public BuildImageCmd withPull (boolean pull );
57113
114+ public BuildImageCmd withMemory (long memory );
115+
116+ public BuildImageCmd withMemswap (long memswap );
117+
118+ public BuildImageCmd withCpushares (String cpushares );
119+
120+ public BuildImageCmd withCpusetcpus (String cpusetcpus );
121+
122+ // setters lib specific
123+
58124 public BuildImageCmd withBuildAuthConfigs (AuthConfigurations authConfig );
59125
126+ public BuildImageCmd withTarInputStream (InputStream tarInputStream );
127+
60128 public static interface Exec extends DockerCmdAsyncExec <BuildImageCmd , BuildResponseItem > {
61129 }
62130
0 commit comments