pulumi-docker-build 0.0.5__py3-none-any.whl → 0.0.7__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of pulumi-docker-build might be problematic. Click here for more details.

@@ -264,7 +264,7 @@ def call_plain(
264
264
  output = pulumi.runtime.call(tok, props, res, typ)
265
265
 
266
266
  # Ingoring deps silently. They are typically non-empty, r.f() calls include r as a dependency.
267
- result, known, secret, _ = _sync_await(asyncio.ensure_future(_await_output(output)))
267
+ result, known, secret, _ = _sync_await(asyncio.create_task(_await_output(output)))
268
268
 
269
269
  problem = None
270
270
  if not known:
@@ -4,9 +4,14 @@
4
4
 
5
5
  import copy
6
6
  import warnings
7
+ import sys
7
8
  import pulumi
8
9
  import pulumi.runtime
9
10
  from typing import Any, Mapping, Optional, Sequence, Union, overload
11
+ if sys.version_info >= (3, 11):
12
+ from typing import NotRequired, TypedDict, TypeAlias
13
+ else:
14
+ from typing_extensions import NotRequired, TypedDict, TypeAlias
10
15
  from .. import _utilities
11
16
  from .. import outputs as _root_outputs
12
17
 
@@ -4,9 +4,14 @@
4
4
 
5
5
  import copy
6
6
  import warnings
7
+ import sys
7
8
  import pulumi
8
9
  import pulumi.runtime
9
10
  from typing import Any, Mapping, Optional, Sequence, Union, overload
11
+ if sys.version_info >= (3, 11):
12
+ from typing import NotRequired, TypedDict, TypeAlias
13
+ else:
14
+ from typing_extensions import NotRequired, TypedDict, TypeAlias
10
15
  from .. import _utilities
11
16
  from .. import outputs as _root_outputs
12
17
 
@@ -4,9 +4,14 @@
4
4
 
5
5
  import copy
6
6
  import warnings
7
+ import sys
7
8
  import pulumi
8
9
  import pulumi.runtime
9
10
  from typing import Any, Mapping, Optional, Sequence, Union, overload
11
+ if sys.version_info >= (3, 11):
12
+ from typing import NotRequired, TypedDict, TypeAlias
13
+ else:
14
+ from typing_extensions import NotRequired, TypedDict, TypeAlias
10
15
  from . import _utilities
11
16
  from . import outputs
12
17
  from ._enums import *
@@ -718,27 +723,27 @@ class Image(pulumi.CustomResource):
718
723
  ecr_repository = aws.ecr.Repository("ecr-repository")
719
724
  auth_token = aws.ecr.get_authorization_token_output(registry_id=ecr_repository.registry_id)
720
725
  my_image = docker_build.Image("my-image",
721
- cache_from=[docker_build.CacheFromArgs(
722
- registry=docker_build.CacheFromRegistryArgs(
723
- ref=ecr_repository.repository_url.apply(lambda repository_url: f"{repository_url}:cache"),
724
- ),
725
- )],
726
- cache_to=[docker_build.CacheToArgs(
727
- registry=docker_build.CacheToRegistryArgs(
728
- image_manifest=True,
729
- oci_media_types=True,
730
- ref=ecr_repository.repository_url.apply(lambda repository_url: f"{repository_url}:cache"),
731
- ),
732
- )],
733
- context=docker_build.BuildContextArgs(
734
- location="./app",
735
- ),
726
+ cache_from=[{
727
+ "registry": {
728
+ "ref": ecr_repository.repository_url.apply(lambda repository_url: f"{repository_url}:cache"),
729
+ },
730
+ }],
731
+ cache_to=[{
732
+ "registry": {
733
+ "image_manifest": True,
734
+ "oci_media_types": True,
735
+ "ref": ecr_repository.repository_url.apply(lambda repository_url: f"{repository_url}:cache"),
736
+ },
737
+ }],
738
+ context={
739
+ "location": "./app",
740
+ },
736
741
  push=True,
737
- registries=[docker_build.RegistryArgs(
738
- address=ecr_repository.repository_url,
739
- password=auth_token.password,
740
- username=auth_token.user_name,
741
- )],
742
+ registries=[{
743
+ "address": ecr_repository.repository_url,
744
+ "password": auth_token.password,
745
+ "username": auth_token.user_name,
746
+ }],
742
747
  tags=[ecr_repository.repository_url.apply(lambda repository_url: f"{repository_url}:latest")])
743
748
  pulumi.export("ref", my_image.ref)
744
749
  ```
@@ -748,9 +753,9 @@ class Image(pulumi.CustomResource):
748
753
  import pulumi_docker_build as docker_build
749
754
 
750
755
  image = docker_build.Image("image",
751
- context=docker_build.BuildContextArgs(
752
- location="app",
753
- ),
756
+ context={
757
+ "location": "app",
758
+ },
754
759
  platforms=[
755
760
  docker_build.Platform.PLAN9_AMD64,
756
761
  docker_build.Platform.PLAN9_386,
@@ -763,15 +768,15 @@ class Image(pulumi.CustomResource):
763
768
  import pulumi_docker_build as docker_build
764
769
 
765
770
  image = docker_build.Image("image",
766
- context=docker_build.BuildContextArgs(
767
- location="app",
768
- ),
771
+ context={
772
+ "location": "app",
773
+ },
769
774
  push=True,
770
- registries=[docker_build.RegistryArgs(
771
- address="docker.io",
772
- password=docker_hub_password,
773
- username="pulumibot",
774
- )],
775
+ registries=[{
776
+ "address": "docker.io",
777
+ "password": docker_hub_password,
778
+ "username": "pulumibot",
779
+ }],
775
780
  tags=["docker.io/pulumi/pulumi:3.107.0"])
776
781
  pulumi.export("ref", my_image["ref"])
777
782
  ```
@@ -781,20 +786,20 @@ class Image(pulumi.CustomResource):
781
786
  import pulumi_docker_build as docker_build
782
787
 
783
788
  image = docker_build.Image("image",
784
- cache_from=[docker_build.CacheFromArgs(
785
- local=docker_build.CacheFromLocalArgs(
786
- src="tmp/cache",
787
- ),
788
- )],
789
- cache_to=[docker_build.CacheToArgs(
790
- local=docker_build.CacheToLocalArgs(
791
- dest="tmp/cache",
792
- mode=docker_build.CacheMode.MAX,
793
- ),
794
- )],
795
- context=docker_build.BuildContextArgs(
796
- location="app",
797
- ),
789
+ cache_from=[{
790
+ "local": {
791
+ "src": "tmp/cache",
792
+ },
793
+ }],
794
+ cache_to=[{
795
+ "local": {
796
+ "dest": "tmp/cache",
797
+ "mode": docker_build.CacheMode.MAX,
798
+ },
799
+ }],
800
+ context={
801
+ "location": "app",
802
+ },
798
803
  push=False)
799
804
  ```
800
805
  ### Docker Build Cloud
@@ -803,12 +808,12 @@ class Image(pulumi.CustomResource):
803
808
  import pulumi_docker_build as docker_build
804
809
 
805
810
  image = docker_build.Image("image",
806
- builder=docker_build.BuilderConfigArgs(
807
- name="cloud-builder-name",
808
- ),
809
- context=docker_build.BuildContextArgs(
810
- location="app",
811
- ),
811
+ builder={
812
+ "name": "cloud-builder-name",
813
+ },
814
+ context={
815
+ "location": "app",
816
+ },
812
817
  exec_=True,
813
818
  push=False)
814
819
  ```
@@ -821,9 +826,9 @@ class Image(pulumi.CustomResource):
821
826
  build_args={
822
827
  "SET_ME_TO_TRUE": "true",
823
828
  },
824
- context=docker_build.BuildContextArgs(
825
- location="app",
826
- ),
829
+ context={
830
+ "location": "app",
831
+ },
827
832
  push=False)
828
833
  ```
829
834
  ### Build target
@@ -832,9 +837,9 @@ class Image(pulumi.CustomResource):
832
837
  import pulumi_docker_build as docker_build
833
838
 
834
839
  image = docker_build.Image("image",
835
- context=docker_build.BuildContextArgs(
836
- location="app",
837
- ),
840
+ context={
841
+ "location": "app",
842
+ },
838
843
  push=False,
839
844
  target="build-me")
840
845
  ```
@@ -844,14 +849,14 @@ class Image(pulumi.CustomResource):
844
849
  import pulumi_docker_build as docker_build
845
850
 
846
851
  image = docker_build.Image("image",
847
- context=docker_build.BuildContextArgs(
848
- location="app",
849
- named={
850
- "golang:latest": docker_build.ContextArgs(
851
- location="docker-image://golang@sha256:b8e62cf593cdaff36efd90aa3a37de268e6781a2e68c6610940c48f7cdf36984",
852
- ),
852
+ context={
853
+ "location": "app",
854
+ "named": {
855
+ "golang_latest": {
856
+ "location": "docker-image://golang@sha256:b8e62cf593cdaff36efd90aa3a37de268e6781a2e68c6610940c48f7cdf36984",
857
+ },
853
858
  },
854
- ),
859
+ },
855
860
  push=False)
856
861
  ```
857
862
  ### Remote context
@@ -860,9 +865,9 @@ class Image(pulumi.CustomResource):
860
865
  import pulumi_docker_build as docker_build
861
866
 
862
867
  image = docker_build.Image("image",
863
- context=docker_build.BuildContextArgs(
864
- location="https://raw.githubusercontent.com/pulumi/pulumi-docker/api-types/provider/testdata/Dockerfile",
865
- ),
868
+ context={
869
+ "location": "https://raw.githubusercontent.com/pulumi/pulumi-docker/api-types/provider/testdata/Dockerfile",
870
+ },
866
871
  push=False)
867
872
  ```
868
873
  ### Inline Dockerfile
@@ -871,14 +876,14 @@ class Image(pulumi.CustomResource):
871
876
  import pulumi_docker_build as docker_build
872
877
 
873
878
  image = docker_build.Image("image",
874
- context=docker_build.BuildContextArgs(
875
- location="app",
876
- ),
877
- dockerfile=docker_build.DockerfileArgs(
878
- inline=\"\"\"FROM busybox
879
+ context={
880
+ "location": "app",
881
+ },
882
+ dockerfile={
883
+ "inline": \"\"\"FROM busybox
879
884
  COPY hello.c ./
880
885
  \"\"\",
881
- ),
886
+ },
882
887
  push=False)
883
888
  ```
884
889
  ### Remote context
@@ -887,12 +892,12 @@ class Image(pulumi.CustomResource):
887
892
  import pulumi_docker_build as docker_build
888
893
 
889
894
  image = docker_build.Image("image",
890
- context=docker_build.BuildContextArgs(
891
- location="https://github.com/docker-library/hello-world.git",
892
- ),
893
- dockerfile=docker_build.DockerfileArgs(
894
- location="app/Dockerfile",
895
- ),
895
+ context={
896
+ "location": "https://github.com/docker-library/hello-world.git",
897
+ },
898
+ dockerfile={
899
+ "location": "app/Dockerfile",
900
+ },
896
901
  push=False)
897
902
  ```
898
903
  ### Local export
@@ -901,14 +906,14 @@ class Image(pulumi.CustomResource):
901
906
  import pulumi_docker_build as docker_build
902
907
 
903
908
  image = docker_build.Image("image",
904
- context=docker_build.BuildContextArgs(
905
- location="app",
906
- ),
907
- exports=[docker_build.ExportArgs(
908
- docker=docker_build.ExportDockerArgs(
909
- tar=True,
910
- ),
911
- )],
909
+ context={
910
+ "location": "app",
911
+ },
912
+ exports=[{
913
+ "docker": {
914
+ "tar": True,
915
+ },
916
+ }],
912
917
  push=False)
913
918
  ```
914
919
 
@@ -1156,27 +1161,27 @@ class Image(pulumi.CustomResource):
1156
1161
  ecr_repository = aws.ecr.Repository("ecr-repository")
1157
1162
  auth_token = aws.ecr.get_authorization_token_output(registry_id=ecr_repository.registry_id)
1158
1163
  my_image = docker_build.Image("my-image",
1159
- cache_from=[docker_build.CacheFromArgs(
1160
- registry=docker_build.CacheFromRegistryArgs(
1161
- ref=ecr_repository.repository_url.apply(lambda repository_url: f"{repository_url}:cache"),
1162
- ),
1163
- )],
1164
- cache_to=[docker_build.CacheToArgs(
1165
- registry=docker_build.CacheToRegistryArgs(
1166
- image_manifest=True,
1167
- oci_media_types=True,
1168
- ref=ecr_repository.repository_url.apply(lambda repository_url: f"{repository_url}:cache"),
1169
- ),
1170
- )],
1171
- context=docker_build.BuildContextArgs(
1172
- location="./app",
1173
- ),
1164
+ cache_from=[{
1165
+ "registry": {
1166
+ "ref": ecr_repository.repository_url.apply(lambda repository_url: f"{repository_url}:cache"),
1167
+ },
1168
+ }],
1169
+ cache_to=[{
1170
+ "registry": {
1171
+ "image_manifest": True,
1172
+ "oci_media_types": True,
1173
+ "ref": ecr_repository.repository_url.apply(lambda repository_url: f"{repository_url}:cache"),
1174
+ },
1175
+ }],
1176
+ context={
1177
+ "location": "./app",
1178
+ },
1174
1179
  push=True,
1175
- registries=[docker_build.RegistryArgs(
1176
- address=ecr_repository.repository_url,
1177
- password=auth_token.password,
1178
- username=auth_token.user_name,
1179
- )],
1180
+ registries=[{
1181
+ "address": ecr_repository.repository_url,
1182
+ "password": auth_token.password,
1183
+ "username": auth_token.user_name,
1184
+ }],
1180
1185
  tags=[ecr_repository.repository_url.apply(lambda repository_url: f"{repository_url}:latest")])
1181
1186
  pulumi.export("ref", my_image.ref)
1182
1187
  ```
@@ -1186,9 +1191,9 @@ class Image(pulumi.CustomResource):
1186
1191
  import pulumi_docker_build as docker_build
1187
1192
 
1188
1193
  image = docker_build.Image("image",
1189
- context=docker_build.BuildContextArgs(
1190
- location="app",
1191
- ),
1194
+ context={
1195
+ "location": "app",
1196
+ },
1192
1197
  platforms=[
1193
1198
  docker_build.Platform.PLAN9_AMD64,
1194
1199
  docker_build.Platform.PLAN9_386,
@@ -1201,15 +1206,15 @@ class Image(pulumi.CustomResource):
1201
1206
  import pulumi_docker_build as docker_build
1202
1207
 
1203
1208
  image = docker_build.Image("image",
1204
- context=docker_build.BuildContextArgs(
1205
- location="app",
1206
- ),
1209
+ context={
1210
+ "location": "app",
1211
+ },
1207
1212
  push=True,
1208
- registries=[docker_build.RegistryArgs(
1209
- address="docker.io",
1210
- password=docker_hub_password,
1211
- username="pulumibot",
1212
- )],
1213
+ registries=[{
1214
+ "address": "docker.io",
1215
+ "password": docker_hub_password,
1216
+ "username": "pulumibot",
1217
+ }],
1213
1218
  tags=["docker.io/pulumi/pulumi:3.107.0"])
1214
1219
  pulumi.export("ref", my_image["ref"])
1215
1220
  ```
@@ -1219,20 +1224,20 @@ class Image(pulumi.CustomResource):
1219
1224
  import pulumi_docker_build as docker_build
1220
1225
 
1221
1226
  image = docker_build.Image("image",
1222
- cache_from=[docker_build.CacheFromArgs(
1223
- local=docker_build.CacheFromLocalArgs(
1224
- src="tmp/cache",
1225
- ),
1226
- )],
1227
- cache_to=[docker_build.CacheToArgs(
1228
- local=docker_build.CacheToLocalArgs(
1229
- dest="tmp/cache",
1230
- mode=docker_build.CacheMode.MAX,
1231
- ),
1232
- )],
1233
- context=docker_build.BuildContextArgs(
1234
- location="app",
1235
- ),
1227
+ cache_from=[{
1228
+ "local": {
1229
+ "src": "tmp/cache",
1230
+ },
1231
+ }],
1232
+ cache_to=[{
1233
+ "local": {
1234
+ "dest": "tmp/cache",
1235
+ "mode": docker_build.CacheMode.MAX,
1236
+ },
1237
+ }],
1238
+ context={
1239
+ "location": "app",
1240
+ },
1236
1241
  push=False)
1237
1242
  ```
1238
1243
  ### Docker Build Cloud
@@ -1241,12 +1246,12 @@ class Image(pulumi.CustomResource):
1241
1246
  import pulumi_docker_build as docker_build
1242
1247
 
1243
1248
  image = docker_build.Image("image",
1244
- builder=docker_build.BuilderConfigArgs(
1245
- name="cloud-builder-name",
1246
- ),
1247
- context=docker_build.BuildContextArgs(
1248
- location="app",
1249
- ),
1249
+ builder={
1250
+ "name": "cloud-builder-name",
1251
+ },
1252
+ context={
1253
+ "location": "app",
1254
+ },
1250
1255
  exec_=True,
1251
1256
  push=False)
1252
1257
  ```
@@ -1259,9 +1264,9 @@ class Image(pulumi.CustomResource):
1259
1264
  build_args={
1260
1265
  "SET_ME_TO_TRUE": "true",
1261
1266
  },
1262
- context=docker_build.BuildContextArgs(
1263
- location="app",
1264
- ),
1267
+ context={
1268
+ "location": "app",
1269
+ },
1265
1270
  push=False)
1266
1271
  ```
1267
1272
  ### Build target
@@ -1270,9 +1275,9 @@ class Image(pulumi.CustomResource):
1270
1275
  import pulumi_docker_build as docker_build
1271
1276
 
1272
1277
  image = docker_build.Image("image",
1273
- context=docker_build.BuildContextArgs(
1274
- location="app",
1275
- ),
1278
+ context={
1279
+ "location": "app",
1280
+ },
1276
1281
  push=False,
1277
1282
  target="build-me")
1278
1283
  ```
@@ -1282,14 +1287,14 @@ class Image(pulumi.CustomResource):
1282
1287
  import pulumi_docker_build as docker_build
1283
1288
 
1284
1289
  image = docker_build.Image("image",
1285
- context=docker_build.BuildContextArgs(
1286
- location="app",
1287
- named={
1288
- "golang:latest": docker_build.ContextArgs(
1289
- location="docker-image://golang@sha256:b8e62cf593cdaff36efd90aa3a37de268e6781a2e68c6610940c48f7cdf36984",
1290
- ),
1290
+ context={
1291
+ "location": "app",
1292
+ "named": {
1293
+ "golang_latest": {
1294
+ "location": "docker-image://golang@sha256:b8e62cf593cdaff36efd90aa3a37de268e6781a2e68c6610940c48f7cdf36984",
1295
+ },
1291
1296
  },
1292
- ),
1297
+ },
1293
1298
  push=False)
1294
1299
  ```
1295
1300
  ### Remote context
@@ -1298,9 +1303,9 @@ class Image(pulumi.CustomResource):
1298
1303
  import pulumi_docker_build as docker_build
1299
1304
 
1300
1305
  image = docker_build.Image("image",
1301
- context=docker_build.BuildContextArgs(
1302
- location="https://raw.githubusercontent.com/pulumi/pulumi-docker/api-types/provider/testdata/Dockerfile",
1303
- ),
1306
+ context={
1307
+ "location": "https://raw.githubusercontent.com/pulumi/pulumi-docker/api-types/provider/testdata/Dockerfile",
1308
+ },
1304
1309
  push=False)
1305
1310
  ```
1306
1311
  ### Inline Dockerfile
@@ -1309,14 +1314,14 @@ class Image(pulumi.CustomResource):
1309
1314
  import pulumi_docker_build as docker_build
1310
1315
 
1311
1316
  image = docker_build.Image("image",
1312
- context=docker_build.BuildContextArgs(
1313
- location="app",
1314
- ),
1315
- dockerfile=docker_build.DockerfileArgs(
1316
- inline=\"\"\"FROM busybox
1317
+ context={
1318
+ "location": "app",
1319
+ },
1320
+ dockerfile={
1321
+ "inline": \"\"\"FROM busybox
1317
1322
  COPY hello.c ./
1318
1323
  \"\"\",
1319
- ),
1324
+ },
1320
1325
  push=False)
1321
1326
  ```
1322
1327
  ### Remote context
@@ -1325,12 +1330,12 @@ class Image(pulumi.CustomResource):
1325
1330
  import pulumi_docker_build as docker_build
1326
1331
 
1327
1332
  image = docker_build.Image("image",
1328
- context=docker_build.BuildContextArgs(
1329
- location="https://github.com/docker-library/hello-world.git",
1330
- ),
1331
- dockerfile=docker_build.DockerfileArgs(
1332
- location="app/Dockerfile",
1333
- ),
1333
+ context={
1334
+ "location": "https://github.com/docker-library/hello-world.git",
1335
+ },
1336
+ dockerfile={
1337
+ "location": "app/Dockerfile",
1338
+ },
1334
1339
  push=False)
1335
1340
  ```
1336
1341
  ### Local export
@@ -1339,14 +1344,14 @@ class Image(pulumi.CustomResource):
1339
1344
  import pulumi_docker_build as docker_build
1340
1345
 
1341
1346
  image = docker_build.Image("image",
1342
- context=docker_build.BuildContextArgs(
1343
- location="app",
1344
- ),
1345
- exports=[docker_build.ExportArgs(
1346
- docker=docker_build.ExportDockerArgs(
1347
- tar=True,
1348
- ),
1349
- )],
1347
+ context={
1348
+ "location": "app",
1349
+ },
1350
+ exports=[{
1351
+ "docker": {
1352
+ "tar": True,
1353
+ },
1354
+ }],
1350
1355
  push=False)
1351
1356
  ```
1352
1357