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 href="https://docs.docker.com/reference/api/docker_remote_api_v1.20/#build-image-from-a-dockerfile">build-image-from-a-dockerfile</a>
1517 */
1618public interface BuildImageCmd extends AsyncDockerCmd <BuildImageCmd , BuildResponseItem > {
1719
18- public BuildImageCmd withTag ( String tag );
20+ // lib specific
1921
2022 public InputStream getTarInputStream ();
2123
24+ public AuthConfigurations getBuildAuthConfigs ();
25+
26+ // getters
27+
28+ /**
29+ * "t" in API
30+ */
31+ @ CheckForNull
2232 public String getTag ();
2333
34+ /**
35+ * "remote" in API
36+ */
37+ @ CheckForNull
38+ public URI getRemote ();
39+
40+ /**
41+ * "nocache" in API
42+ */
2443 public boolean hasNoCacheEnabled ();
2544
45+ /**
46+ * "rm" in API
47+ */
2648 public boolean hasRemoveEnabled ();
2749
50+ /**
51+ * "forcerm" in API
52+ */
53+ public boolean isForcerm ();
54+
55+ @ CheckForNull
56+ public Boolean getForcerm ();
57+
58+ /**
59+ * "q" in API
60+ */
2861 public boolean isQuiet ();
2962
63+ /**
64+ * "pull" in API
65+ */
3066 public boolean hasPullEnabled ();
3167
68+ @ CheckForNull
3269 public String getPathToDockerfile ();
3370
34- public AuthConfigurations getBuildAuthConfigs ();
71+ @ CheckForNull
72+ public Long getMemory ();
73+
74+ @ CheckForNull
75+ public Long getMemswap ();
76+
77+ @ CheckForNull
78+ public String getCpushares ();
79+
80+ @ CheckForNull
81+ public String getCpusetcpus ();
82+
83+ // setters
84+
85+ public BuildImageCmd withTag (String tag );
86+
87+ public BuildImageCmd withRemote (URI remote );
3588
3689 public BuildImageCmd withBaseDirectory (File baseDirectory );
3790
3891 public BuildImageCmd withDockerfile (File dockerfile );
3992
40- public BuildImageCmd withTarInputStream (InputStream tarInputStream );
41-
4293 public BuildImageCmd withNoCache ();
4394
4495 public BuildImageCmd withNoCache (boolean noCache );
@@ -47,6 +98,10 @@ public interface BuildImageCmd extends AsyncDockerCmd<BuildImageCmd, BuildRespon
4798
4899 public BuildImageCmd withRemove (boolean rm );
49100
101+ public BuildImageCmd withForcerm ();
102+
103+ public BuildImageCmd withForcerm (Boolean forcerm );
104+
50105 public BuildImageCmd withQuiet ();
51106
52107 public BuildImageCmd withQuiet (boolean quiet );
@@ -55,8 +110,20 @@ public interface BuildImageCmd extends AsyncDockerCmd<BuildImageCmd, BuildRespon
55110
56111 public BuildImageCmd withPull (boolean pull );
57112
113+ public BuildImageCmd withMemory (long memory );
114+
115+ public BuildImageCmd withMemswap (long memswap );
116+
117+ public BuildImageCmd withCpushares (String cpushares );
118+
119+ public BuildImageCmd withCpusetcpus (String cpusetcpus );
120+
121+ // setters lib specific
122+
58123 public BuildImageCmd withBuildAuthConfigs (AuthConfigurations authConfig );
59124
125+ public BuildImageCmd withTarInputStream (InputStream tarInputStream );
126+
60127 public static interface Exec extends DockerCmdAsyncExec <BuildImageCmd , BuildResponseItem > {
61128 }
62129
0 commit comments