wal 0.0.0 → 0.0.1

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.
Files changed (119) hide show
  1. checksums.yaml +4 -4
  2. data/.rspec +1 -0
  3. data/README.md +49 -0
  4. data/Rakefile +9 -1
  5. data/exe/wal +64 -0
  6. data/lib/wal/active_record_context_extension.rb +15 -0
  7. data/lib/wal/noop_watcher.rb +12 -0
  8. data/lib/wal/record_watcher.rb +389 -0
  9. data/lib/wal/replicator.rb +205 -0
  10. data/lib/wal/streaming_watcher.rb +74 -0
  11. data/lib/wal/version.rb +2 -1
  12. data/lib/wal/watcher.rb +95 -0
  13. data/lib/wal.rb +128 -1
  14. data/rbi/wal.rbi +295 -0
  15. data/sig/wal.rbs +184 -2
  16. data/sorbet/config +7 -0
  17. data/sorbet/rbi/annotations/.gitattributes +1 -0
  18. data/sorbet/rbi/annotations/activemodel.rbi +89 -0
  19. data/sorbet/rbi/annotations/activerecord.rbi +98 -0
  20. data/sorbet/rbi/annotations/activesupport.rbi +463 -0
  21. data/sorbet/rbi/annotations/minitest.rbi +119 -0
  22. data/sorbet/rbi/annotations/rainbow.rbi +269 -0
  23. data/sorbet/rbi/gems/.gitattributes +1 -0
  24. data/sorbet/rbi/gems/actioncable@8.0.2.rbi +9 -0
  25. data/sorbet/rbi/gems/actionmailbox@8.0.2.rbi +9 -0
  26. data/sorbet/rbi/gems/actionmailer@8.0.2.rbi +9 -0
  27. data/sorbet/rbi/gems/actionpack@8.0.2.rbi +21122 -0
  28. data/sorbet/rbi/gems/actiontext@8.0.2.rbi +9 -0
  29. data/sorbet/rbi/gems/actionview@8.0.2.rbi +16423 -0
  30. data/sorbet/rbi/gems/activejob@8.0.2.rbi +9 -0
  31. data/sorbet/rbi/gems/activemodel@8.0.2.rbi +6866 -0
  32. data/sorbet/rbi/gems/activerecord@8.0.2.rbi +43227 -0
  33. data/sorbet/rbi/gems/activestorage@8.0.2.rbi +9 -0
  34. data/sorbet/rbi/gems/activesupport@8.0.2.rbi +21110 -0
  35. data/sorbet/rbi/gems/ast@2.4.3.rbi +585 -0
  36. data/sorbet/rbi/gems/base64@0.3.0.rbi +545 -0
  37. data/sorbet/rbi/gems/benchmark@0.4.1.rbi +619 -0
  38. data/sorbet/rbi/gems/bigdecimal@3.2.2.rbi +78 -0
  39. data/sorbet/rbi/gems/builder@3.3.0.rbi +9 -0
  40. data/sorbet/rbi/gems/commander@5.0.0.rbi +9 -0
  41. data/sorbet/rbi/gems/concurrent-ruby@1.3.5.rbi +11657 -0
  42. data/sorbet/rbi/gems/connection_pool@2.5.3.rbi +9 -0
  43. data/sorbet/rbi/gems/crass@1.0.6.rbi +623 -0
  44. data/sorbet/rbi/gems/date@3.4.1.rbi +75 -0
  45. data/sorbet/rbi/gems/diff-lcs@1.6.2.rbi +1134 -0
  46. data/sorbet/rbi/gems/docker-api@2.4.0.rbi +1719 -0
  47. data/sorbet/rbi/gems/docopt@0.6.1.rbi +9 -0
  48. data/sorbet/rbi/gems/drb@2.2.3.rbi +1661 -0
  49. data/sorbet/rbi/gems/erubi@1.13.1.rbi +155 -0
  50. data/sorbet/rbi/gems/excon@1.2.7.rbi +1514 -0
  51. data/sorbet/rbi/gems/globalid@1.2.1.rbi +9 -0
  52. data/sorbet/rbi/gems/highline@3.0.1.rbi +9 -0
  53. data/sorbet/rbi/gems/i18n@1.14.7.rbi +2359 -0
  54. data/sorbet/rbi/gems/io-console@0.8.0.rbi +9 -0
  55. data/sorbet/rbi/gems/logger@1.7.0.rbi +963 -0
  56. data/sorbet/rbi/gems/loofah@2.24.1.rbi +1105 -0
  57. data/sorbet/rbi/gems/mail@2.8.1.rbi +9 -0
  58. data/sorbet/rbi/gems/marcel@1.0.4.rbi +9 -0
  59. data/sorbet/rbi/gems/mini_mime@1.1.5.rbi +9 -0
  60. data/sorbet/rbi/gems/minitest@5.25.5.rbi +1704 -0
  61. data/sorbet/rbi/gems/multi_json@1.15.0.rbi +268 -0
  62. data/sorbet/rbi/gems/net-imap@0.5.9.rbi +9 -0
  63. data/sorbet/rbi/gems/net-pop@0.1.2.rbi +9 -0
  64. data/sorbet/rbi/gems/net-protocol@0.2.2.rbi +292 -0
  65. data/sorbet/rbi/gems/net-smtp@0.5.1.rbi +9 -0
  66. data/sorbet/rbi/gems/netrc@0.11.0.rbi +159 -0
  67. data/sorbet/rbi/gems/nio4r@2.7.4.rbi +9 -0
  68. data/sorbet/rbi/gems/nokogiri@1.18.8.rbi +8206 -0
  69. data/sorbet/rbi/gems/ostruct@0.6.2.rbi +354 -0
  70. data/sorbet/rbi/gems/parallel@1.27.0.rbi +291 -0
  71. data/sorbet/rbi/gems/parlour@9.1.1.rbi +3071 -0
  72. data/sorbet/rbi/gems/parser@3.3.8.0.rbi +7338 -0
  73. data/sorbet/rbi/gems/pg-replication-protocol@0.0.7.rbi +633 -0
  74. data/sorbet/rbi/gems/pg@1.5.9.rbi +2806 -0
  75. data/sorbet/rbi/gems/pp@0.6.2.rbi +368 -0
  76. data/sorbet/rbi/gems/prettyprint@0.2.0.rbi +477 -0
  77. data/sorbet/rbi/gems/prism@1.4.0.rbi +41732 -0
  78. data/sorbet/rbi/gems/psych@5.2.3.rbi +2435 -0
  79. data/sorbet/rbi/gems/racc@1.8.1.rbi +160 -0
  80. data/sorbet/rbi/gems/rack-session@2.1.1.rbi +727 -0
  81. data/sorbet/rbi/gems/rack-test@2.2.0.rbi +734 -0
  82. data/sorbet/rbi/gems/rack@3.1.16.rbi +4940 -0
  83. data/sorbet/rbi/gems/rackup@2.2.1.rbi +230 -0
  84. data/sorbet/rbi/gems/rails-dom-testing@2.3.0.rbi +858 -0
  85. data/sorbet/rbi/gems/rails-html-sanitizer@1.6.2.rbi +785 -0
  86. data/sorbet/rbi/gems/rails@8.0.2.rbi +9 -0
  87. data/sorbet/rbi/gems/railties@8.0.2.rbi +3865 -0
  88. data/sorbet/rbi/gems/rainbow@3.1.1.rbi +403 -0
  89. data/sorbet/rbi/gems/rake@13.2.1.rbi +3120 -0
  90. data/sorbet/rbi/gems/rbi@0.3.6.rbi +6893 -0
  91. data/sorbet/rbi/gems/rbs@3.9.4.rbi +6978 -0
  92. data/sorbet/rbi/gems/rdoc@6.12.0.rbi +12760 -0
  93. data/sorbet/rbi/gems/reline@0.6.0.rbi +2451 -0
  94. data/sorbet/rbi/gems/rexml@3.4.1.rbi +5240 -0
  95. data/sorbet/rbi/gems/rspec-core@3.13.4.rbi +11348 -0
  96. data/sorbet/rbi/gems/rspec-expectations@3.13.5.rbi +8189 -0
  97. data/sorbet/rbi/gems/rspec-mocks@3.13.5.rbi +5350 -0
  98. data/sorbet/rbi/gems/rspec-sorbet@1.9.2.rbi +164 -0
  99. data/sorbet/rbi/gems/rspec-support@3.13.4.rbi +1630 -0
  100. data/sorbet/rbi/gems/rspec@3.13.1.rbi +83 -0
  101. data/sorbet/rbi/gems/securerandom@0.4.1.rbi +75 -0
  102. data/sorbet/rbi/gems/spoom@1.6.3.rbi +6985 -0
  103. data/sorbet/rbi/gems/stringio@3.1.5.rbi +9 -0
  104. data/sorbet/rbi/gems/tapioca@0.16.11.rbi +3628 -0
  105. data/sorbet/rbi/gems/testcontainers-core@0.2.0.rbi +1005 -0
  106. data/sorbet/rbi/gems/testcontainers-postgres@0.2.0.rbi +145 -0
  107. data/sorbet/rbi/gems/thor@1.3.2.rbi +4378 -0
  108. data/sorbet/rbi/gems/timeout@0.4.3.rbi +157 -0
  109. data/sorbet/rbi/gems/tzinfo@2.0.6.rbi +5918 -0
  110. data/sorbet/rbi/gems/uri@1.0.3.rbi +2349 -0
  111. data/sorbet/rbi/gems/useragent@0.16.11.rbi +9 -0
  112. data/sorbet/rbi/gems/websocket-driver@0.8.0.rbi +9 -0
  113. data/sorbet/rbi/gems/websocket-extensions@0.1.5.rbi +9 -0
  114. data/sorbet/rbi/gems/yard-sorbet@0.9.0.rbi +435 -0
  115. data/sorbet/rbi/gems/yard@0.9.37.rbi +18379 -0
  116. data/sorbet/rbi/gems/zeitwerk@2.7.3.rbi +9 -0
  117. data/sorbet/tapioca/config.yml +5 -0
  118. data/sorbet/tapioca/require.rb +12 -0
  119. metadata +231 -6
@@ -0,0 +1,1005 @@
1
+ # typed: true
2
+
3
+ # DO NOT EDIT MANUALLY
4
+ # This is an autogenerated file for types exported from the `testcontainers-core` gem.
5
+ # Please instead update this file by running `bin/tapioca gem testcontainers-core`.
6
+
7
+
8
+ # source://testcontainers-core//lib/testcontainers/docker_container.rb#1
9
+ module Testcontainers
10
+ class << self
11
+ # source://testcontainers-core//lib/testcontainers.rb#30
12
+ def logger; end
13
+
14
+ # Sets the attribute logger
15
+ #
16
+ # @param value the value to set the attribute logger to.
17
+ #
18
+ # source://testcontainers-core//lib/testcontainers.rb#28
19
+ def logger=(_arg0); end
20
+ end
21
+ end
22
+
23
+ # source://testcontainers-core//lib/testcontainers.rb#13
24
+ class Testcontainers::ConnectionError < ::Testcontainers::Error; end
25
+
26
+ # source://testcontainers-core//lib/testcontainers.rb#25
27
+ class Testcontainers::ContainerLaunchException < ::Testcontainers::Error; end
28
+
29
+ # source://testcontainers-core//lib/testcontainers.rb#19
30
+ class Testcontainers::ContainerNotStartedError < ::Testcontainers::Error; end
31
+
32
+ # The DockerContainer class is used to manage Docker containers.
33
+ # It provides an interface to create, start, stop, and manipulate containers
34
+ # using the Docker API.
35
+ #
36
+ # @attr name [String] the container's name
37
+ # @attr image [String] the container's image name
38
+ # @attr command [Array<String>, nil] the command to run in the container
39
+ # @attr entrypoint [Array<String>, nil] the entrypoint to run in the container
40
+ # @attr exposed_ports [Hash, nil] a hash mapping exposed container ports to an empty hash (used for Docker API compatibility)
41
+ # @attr port_bindings [Hash, nil] a hash mapping container ports to host port bindings (used for Docker API compatibility)
42
+ # @attr volumes [Hash, nil] a hash mapping volume paths in the container to an empty hash (used for Docker API compatibility)
43
+ # @attr filesystem_binds [Array<String>, nil] an array of strings representing bind mounts from the host to the container
44
+ # @attr env [Array<String>, nil] an array of environment variables for the container in the format KEY=VALUE
45
+ # @attr labels [Hash, nil] a hash of labels to be applied to the container
46
+ # @attr working_dir [String, nil] the working directory for the container
47
+ # @attr healthcheck [Hash, nil] a hash of healthcheck options for the container
48
+ # @attr logger [Logger] a logger instance for the container
49
+ # @attr_reader _container [Docker::Container, nil] the underlying Docker::Container object
50
+ # @attr_reader _id [String, nil] the container's ID
51
+ #
52
+ # source://testcontainers-core//lib/testcontainers/docker_container.rb#21
53
+ class Testcontainers::DockerContainer
54
+ # Initializes a new DockerContainer instance.
55
+ #
56
+ # @param image [String] the container's image name
57
+ # @param command [Array<String>, nil] the command to run in the container
58
+ # @param name [String, nil] the container's name
59
+ # @param exposed_ports [Hash, Array<String>, nil] a hash or an array of exposed container ports
60
+ # @param image_create_options [Hash] a hash of options to pass to Docker::Image.create.
61
+ # @param port_bindings [Hash, Array<String>, nil] a hash or an array of container ports to host port bindings
62
+ # @param volumes [Hash, Array<String>, nil] a hash or an array of volume paths in the container
63
+ # @param filesystem_binds [Array<String>, Hash, nil] an array of strings or a hash representing bind mounts from the host to the container
64
+ # @param env [Array<String>, Hash, nil] an array or a hash of environment variables for the container in the format KEY=VALUE
65
+ # @param labels [Hash, nil] a hash of labels to be applied to the container
66
+ # @param working_dir [String, nil] the working directory for the container
67
+ # @param logger [Logger] a logger instance for the container
68
+ # @return [DockerContainer] a new instance of DockerContainer
69
+ #
70
+ # source://testcontainers-core//lib/testcontainers/docker_container.rb#41
71
+ def initialize(image, name: T.unsafe(nil), command: T.unsafe(nil), entrypoint: T.unsafe(nil), exposed_ports: T.unsafe(nil), image_create_options: T.unsafe(nil), port_bindings: T.unsafe(nil), volumes: T.unsafe(nil), filesystem_binds: T.unsafe(nil), env: T.unsafe(nil), labels: T.unsafe(nil), working_dir: T.unsafe(nil), healthcheck: T.unsafe(nil), wait_for: T.unsafe(nil), logger: T.unsafe(nil)); end
72
+
73
+ # the underlying Docker::Container object
74
+ #
75
+ # @return [Docker::Container, nil] the current value of _container
76
+ #
77
+ # source://testcontainers-core//lib/testcontainers/docker_container.rb#25
78
+ def _container; end
79
+
80
+ # the container's ID
81
+ #
82
+ # @return [String, nil] the current value of _id
83
+ #
84
+ # source://testcontainers-core//lib/testcontainers/docker_container.rb#25
85
+ def _id; end
86
+
87
+ # Add environment variables to the container configuration.
88
+ #
89
+ # @param env_or_key [String, Hash, Array] The environment variable(s) to add.
90
+ # - When passing a Hash, the keys and values represent the variable names and values.
91
+ # - When passing an Array, each element should be a String in the format "KEY=VALUE".
92
+ # - When passing a String, it should be in the format "KEY=VALUE" or a key when a value is also provided.
93
+ # @param value [String, nil] The value for the environment variable if env_or_key is a key (String).
94
+ # @return [Array<String>] The updated list of environment variables in the format "KEY=VALUE".
95
+ #
96
+ # source://testcontainers-core//lib/testcontainers/docker_container.rb#72
97
+ def add_env(env_or_key, value = T.unsafe(nil)); end
98
+
99
+ # Add an exposed port to the container configuration.
100
+ #
101
+ # @param port [String, Integer] The port to expose in the format "port/protocol" or as an integer.
102
+ # @return [Hash] The updated list of exposed ports.
103
+ #
104
+ # source://testcontainers-core//lib/testcontainers/docker_container.rb#83
105
+ def add_exposed_port(port); end
106
+
107
+ # Add multiple exposed ports to the container configuration.
108
+ #
109
+ # @param ports [Array<String, Integer>] The list of ports to expose.
110
+ # @return [Hash] The updated list of exposed ports
111
+ #
112
+ # source://testcontainers-core//lib/testcontainers/docker_container.rb#96
113
+ def add_exposed_ports(*ports); end
114
+
115
+ # Add a filesystem bind to the container configuration.
116
+ #
117
+ # @param host_or_hash [String, Hash] The host path or a Hash with a single key-value pair representing the host and container paths.
118
+ # @param container_path [String, nil] The container path if host_or_hash is a String.
119
+ # @param mode [String] The access mode for the bind ("rw" for read-write, "ro" for read-only). Default is "rw".
120
+ # @return [Array<String>] The updated list of filesystem binds in the format "host_path:container_path:mode".
121
+ #
122
+ # source://testcontainers-core//lib/testcontainers/docker_container.rb#162
123
+ def add_filesystem_bind(host_or_hash, container_path = T.unsafe(nil), mode = T.unsafe(nil)); end
124
+
125
+ # Add multiple filesystem binds to the container configuration.
126
+ #
127
+ # @param filesystem_binds [Array<String>, Array<Array<String>>, Hash] The list of filesystem binds.
128
+ # @return [Array<String>] The updated list of filesystem binds in the format "host_path:container_path:mode".
129
+ #
130
+ # source://testcontainers-core//lib/testcontainers/docker_container.rb#187
131
+ def add_filesystem_binds(filesystem_binds); end
132
+
133
+ # Add a fixed exposed port to the container configuration.
134
+ #
135
+ # @param container_port [String, Integer, Hash] The container port in the format "port/protocol" or as an integer.
136
+ # When passing a Hash, it should contain a single key-value pair with the container port as the key and the host port as the value.
137
+ # @param host_port [Integer, nil] The host port to bind the container port to.
138
+ # @return [Hash] The updated list of port bindings.
139
+ #
140
+ # source://testcontainers-core//lib/testcontainers/docker_container.rb#111
141
+ def add_fixed_exposed_port(container_port, host_port = T.unsafe(nil)); end
142
+
143
+ # Add multiple fixed exposed ports to the container configuration.
144
+ #
145
+ # @param port_mappings [Hash] The list of container ports and host ports to bind them to.
146
+ # @return [Hash] The updated list of port bindings.
147
+ #
148
+ # source://testcontainers-core//lib/testcontainers/docker_container.rb#128
149
+ def add_fixed_exposed_ports(port_mappings = T.unsafe(nil)); end
150
+
151
+ # Adds a healthcheck to the container.
152
+ #
153
+ # @option options
154
+ # @option options
155
+ # @option options
156
+ # @option options
157
+ # @option options
158
+ # @param options [Hash] the healthcheck options.
159
+ # @return [Hash] the healthcheck options for Docker.
160
+ #
161
+ # source://testcontainers-core//lib/testcontainers/docker_container.rb#226
162
+ def add_healthcheck(options = T.unsafe(nil)); end
163
+
164
+ # Add a label to the container configuration.
165
+ #
166
+ # @param label [String] The label to add.
167
+ # @param value [String] The value of the label.
168
+ # @return [Hash] The updated list of labels.
169
+ #
170
+ # source://testcontainers-core//lib/testcontainers/docker_container.rb#201
171
+ def add_label(label, value); end
172
+
173
+ # Add multiple labels to the container configuration.
174
+ #
175
+ # @param labels [Hash] The labels to add.
176
+ # @return [Hash] The updated list of labels.
177
+ #
178
+ # source://testcontainers-core//lib/testcontainers/docker_container.rb#211
179
+ def add_labels(labels); end
180
+
181
+ # Add a volume to the container configuration.
182
+ #
183
+ # @param volume [String] The volume to add.
184
+ # @return [Hash] The updated list of volumes.
185
+ #
186
+ # source://testcontainers-core//lib/testcontainers/docker_container.rb#139
187
+ def add_volume(volume); end
188
+
189
+ # Add multiple volumes to the container configuration.
190
+ #
191
+ # @param volumes [Array<String>] The list of volumes to add.
192
+ # @return [Hash] The updated list of volumes.
193
+ #
194
+ # source://testcontainers-core//lib/testcontainers/docker_container.rb#149
195
+ def add_volumes(volumes = T.unsafe(nil)); end
196
+
197
+ # Add a wait_for strategy to the container configuration.
198
+ #
199
+ # @param method [Symbol, String, Proc, Array] The method to call on the container to wait for it to be ready.
200
+ # @param args [Array] The arguments to pass to the method if it is a symbol or string.
201
+ # @param kwargs [Hash] The keyword arguments to pass to the method if it is a symbol or string.
202
+ # @param block [Proc] The block to call on the container to wait for it to be ready.
203
+ # @return [Proc] The wait_for strategy.
204
+ #
205
+ # source://testcontainers-core//lib/testcontainers/docker_container.rb#258
206
+ def add_wait_for(method = T.unsafe(nil), *args, **kwargs, &block); end
207
+
208
+ # the command to run in the container
209
+ #
210
+ # @return [Array<String>, nil] the current value of command
211
+ #
212
+ # source://testcontainers-core//lib/testcontainers/docker_container.rb#22
213
+ def command; end
214
+
215
+ # the command to run in the container
216
+ #
217
+ # @param value [Array<String>, nil] the value to set the attribute command to.
218
+ # @return [Array<String>, nil] the newly set value
219
+ #
220
+ # source://testcontainers-core//lib/testcontainers/docker_container.rb#22
221
+ def command=(_arg0); end
222
+
223
+ # Copies a file from the container to the host.
224
+ #
225
+ # @param container_path [String] The path to the file inside the container.
226
+ # @param host_path_or_io [String, IO] The path to the file on the host or a IO object.
227
+ # @raise [ContainerNotStartedError] If the container has not been started.
228
+ # @raise [ConnectionError] If the connection to the Docker daemon fails.
229
+ # @return [String] The contents of the file inside the container.
230
+ #
231
+ # source://testcontainers-core//lib/testcontainers/docker_container.rb#951
232
+ def copy_file_from_container(container_path, host_path_or_io); end
233
+
234
+ # Copies a IO object or a file from the host to the container.
235
+ #
236
+ # @param container_path [String] The path to the file inside the container.
237
+ # @param host_path_or_io [String, IO] The path to the file on the host or a IO object.
238
+ # @raise [ContainerNotStartedError] If the container has not been started.
239
+ # @raise [ConnectionError] If the connection to the Docker daemon fails.
240
+ # @return [self]
241
+ #
242
+ # source://testcontainers-core//lib/testcontainers/docker_container.rb#925
243
+ def copy_file_to_container(container_path, host_path_or_io); end
244
+
245
+ # Returns the container's created at timestamp.
246
+ # The timestamp is in UTC and formatted as ISO 8601. Example: "2014-10-31T23:22:05.430Z".
247
+ #
248
+ # @return [String] The container's created at timestamp.
249
+ # @return [nil] If the container does not exist.
250
+ #
251
+ # source://testcontainers-core//lib/testcontainers/docker_container.rb#673
252
+ def created_at; end
253
+
254
+ # Returns whether the container is running.
255
+ #
256
+ # @raise [ConnectionError] If the connection to the Docker daemon fails.
257
+ # @raise [ContainerNotStartedError] If the container has not been started.
258
+ # @return [Boolean] Whether the container is running.
259
+ #
260
+ # source://testcontainers-core//lib/testcontainers/docker_container.rb#583
261
+ def dead?; end
262
+
263
+ # Removes the container.
264
+ #
265
+ # @param options [Hash] Additional options to send to the container remove command.
266
+ # @raise [ConnectionError] If the connection to the Docker daemon fails.
267
+ # @return [DockerContainer] The DockerContainer instance.
268
+ # @return [nil] If the container does not exist.
269
+ # @see #remove
270
+ #
271
+ # source://testcontainers-core//lib/testcontainers/docker_container.rb#542
272
+ def delete(options = T.unsafe(nil)); end
273
+
274
+ # Starts the container.
275
+ #
276
+ # @raise [ConnectionError] If the connection to the Docker daemon fails.
277
+ # @raise [NotFoundError] If Docker is unable to find the image.
278
+ # @return [DockerContainer] The DockerContainer instance.
279
+ #
280
+ # source://testcontainers-core//lib/testcontainers/docker_container.rb#474
281
+ def enter; end
282
+
283
+ # the entrypoint to run in the container
284
+ #
285
+ # @return [Array<String>, nil] the current value of entrypoint
286
+ #
287
+ # source://testcontainers-core//lib/testcontainers/docker_container.rb#22
288
+ def entrypoint; end
289
+
290
+ # the entrypoint to run in the container
291
+ #
292
+ # @param value [Array<String>, nil] the value to set the attribute entrypoint to.
293
+ # @return [Array<String>, nil] the newly set value
294
+ #
295
+ # source://testcontainers-core//lib/testcontainers/docker_container.rb#22
296
+ def entrypoint=(_arg0); end
297
+
298
+ # an array of environment variables for the container in the format KEY=VALUE
299
+ #
300
+ # @return [Array<String>, nil] the current value of env
301
+ #
302
+ # source://testcontainers-core//lib/testcontainers/docker_container.rb#22
303
+ def env; end
304
+
305
+ # an array of environment variables for the container in the format KEY=VALUE
306
+ #
307
+ # @param value [Array<String>, nil] the value to set the attribute env to.
308
+ # @return [Array<String>, nil] the newly set value
309
+ #
310
+ # source://testcontainers-core//lib/testcontainers/docker_container.rb#22
311
+ def env=(_arg0); end
312
+
313
+ # Executes a command in the container.
314
+ # See https://docs.docker.com/engine/api/v1.42/#operation/ContainerExec for all available options.
315
+ #
316
+ # @option options
317
+ # @option options
318
+ # @option options
319
+ # @option options
320
+ # @option options
321
+ # @param cmd [Array<String>] The command to execute.
322
+ # @param options [Hash] Additional options to pass to the Docker Exec API. (e.g `Env`)
323
+ # @return [Array, Array, Integer] The STDOUT, STDERR and exit code.
324
+ #
325
+ # source://testcontainers-core//lib/testcontainers/docker_container.rb#796
326
+ def exec(cmd, options = T.unsafe(nil), &block); end
327
+
328
+ # Returns whether the container exists.
329
+ #
330
+ # @raise [ConnectionError] If the connection to the Docker daemon fails.
331
+ # @return [Boolean] Whether the container exists.
332
+ #
333
+ # source://testcontainers-core//lib/testcontainers/docker_container.rb#657
334
+ def exists?; end
335
+
336
+ # Stops the container.
337
+ #
338
+ # @param force [Boolean] Whether to force the container to stop.
339
+ # @raise [ConnectionError] If the connection to the Docker daemon fails.
340
+ # @raise [ContainerNotStartedError] If the container has not been started.
341
+ # @return [DockerContainer] The DockerContainer instance.
342
+ # @see #stop
343
+ #
344
+ # source://testcontainers-core//lib/testcontainers/docker_container.rb#502
345
+ def exit(force: T.unsafe(nil)); end
346
+
347
+ # Returns whether the container is stopped.
348
+ #
349
+ # @raise [ConnectionError] If the connection to the Docker daemon fails.
350
+ # @raise [ContainerNotStartedError] If the container has not been started.
351
+ # @return [Boolean] Whether the container is stopped.
352
+ #
353
+ # source://testcontainers-core//lib/testcontainers/docker_container.rb#621
354
+ def exited?; end
355
+
356
+ # a hash mapping exposed container ports to an empty hash (used for Docker API compatibility)
357
+ #
358
+ # @return [Hash, nil] the current value of exposed_ports
359
+ #
360
+ # source://testcontainers-core//lib/testcontainers/docker_container.rb#22
361
+ def exposed_ports; end
362
+
363
+ # a hash mapping exposed container ports to an empty hash (used for Docker API compatibility)
364
+ #
365
+ # @param value [Hash, nil] the value to set the attribute exposed_ports to.
366
+ # @return [Hash, nil] the newly set value
367
+ #
368
+ # source://testcontainers-core//lib/testcontainers/docker_container.rb#22
369
+ def exposed_ports=(_arg0); end
370
+
371
+ # an array of strings representing bind mounts from the host to the container
372
+ #
373
+ # @return [Array<String>, nil] the current value of filesystem_binds
374
+ #
375
+ # source://testcontainers-core//lib/testcontainers/docker_container.rb#22
376
+ def filesystem_binds; end
377
+
378
+ # an array of strings representing bind mounts from the host to the container
379
+ #
380
+ # @param value [Array<String>, nil] the value to set the attribute filesystem_binds to.
381
+ # @return [Array<String>, nil] the newly set value
382
+ #
383
+ # source://testcontainers-core//lib/testcontainers/docker_container.rb#22
384
+ def filesystem_binds=(_arg0); end
385
+
386
+ # Returns the container's first mapped port.
387
+ #
388
+ # @raise [ConnectionError] If the connection to the Docker daemon fails.
389
+ # @return [Integer] The container's first mapped port.
390
+ #
391
+ # source://testcontainers-core//lib/testcontainers/docker_container.rb#736
392
+ def first_mapped_port; end
393
+
394
+ # Returns the value for the given environment variable.
395
+ #
396
+ # @param key [String] The environment variable's key.
397
+ # @return [String] The environment variable's value.
398
+ # @return [nil] If the environment variable does not exist.
399
+ #
400
+ # source://testcontainers-core//lib/testcontainers/docker_container.rb#764
401
+ def get_env(key); end
402
+
403
+ # a hash of healthcheck options for the container
404
+ #
405
+ # @return [Hash, nil] the current value of healthcheck
406
+ #
407
+ # source://testcontainers-core//lib/testcontainers/docker_container.rb#22
408
+ def healthcheck; end
409
+
410
+ # a hash of healthcheck options for the container
411
+ #
412
+ # @param value [Hash, nil] the value to set the attribute healthcheck to.
413
+ # @return [Hash, nil] the newly set value
414
+ #
415
+ # source://testcontainers-core//lib/testcontainers/docker_container.rb#22
416
+ def healthcheck=(_arg0); end
417
+
418
+ # Returns whether the container is healthy.
419
+ #
420
+ # @raise [ConnectionError] If the connection to the Docker daemon fails.
421
+ # @raise [HealthcheckNotSupportedError] If the container does not support healthchecks.
422
+ # @return [Boolean] Whether the container is healthy.
423
+ # @return [false] If the container has not been started instead of raising an ContainerNotStartedError.
424
+ #
425
+ # source://testcontainers-core//lib/testcontainers/docker_container.rb#631
426
+ def healthy?; end
427
+
428
+ # Returns the container's host.
429
+ #
430
+ # @raise [ConnectionError] If the connection to the Docker daemon fails.
431
+ # @raise [ContainerNotStartedError] If the container has not been started.
432
+ # @return [String] The container's host.
433
+ #
434
+ # source://testcontainers-core//lib/testcontainers/docker_container.rb#696
435
+ def host; end
436
+
437
+ # the container's image name
438
+ #
439
+ # @return [String] the current value of image
440
+ #
441
+ # source://testcontainers-core//lib/testcontainers/docker_container.rb#22
442
+ def image; end
443
+
444
+ # the container's image name
445
+ #
446
+ # @param value [String] the value to set the attribute image to.
447
+ # @return [String] the newly set value
448
+ #
449
+ # source://testcontainers-core//lib/testcontainers/docker_container.rb#22
450
+ def image=(_arg0); end
451
+
452
+ # Returns the container's info (inspect).
453
+ # See https://docs.docker.com/engine/api/v1.42/#tag/Container/operation/ContainerInspect
454
+ #
455
+ # @raise [ConnectionError] If the connection to the Docker daemon fails.
456
+ # @raise [ContainerNotStartedError] If the container has not been started.
457
+ # @return [Hash] The container's info.
458
+ # @return [nil] If the container does not exist.
459
+ #
460
+ # source://testcontainers-core//lib/testcontainers/docker_container.rb#684
461
+ def info; end
462
+
463
+ # Returns whether this is running inside a container.
464
+ #
465
+ # @return [Boolean] Whether this is running inside a container.
466
+ #
467
+ # source://testcontainers-core//lib/testcontainers/docker_container.rb#914
468
+ def inside_container?; end
469
+
470
+ # Kills the container with the specified signal
471
+ #
472
+ # @param signal [String] The signal to send to the container.
473
+ # @raise [ConnectionError] If the connection to the Docker daemon fails.
474
+ # @raise [ContainerNotStartedError] If the container has not been started.
475
+ # @return [DockerContainer] The DockerContainer instance.
476
+ # @return [nil] If the container does not exist.
477
+ #
478
+ # source://testcontainers-core//lib/testcontainers/docker_container.rb#528
479
+ def kill(signal: T.unsafe(nil)); end
480
+
481
+ # a hash of labels to be applied to the container
482
+ #
483
+ # @return [Hash, nil] the current value of labels
484
+ #
485
+ # source://testcontainers-core//lib/testcontainers/docker_container.rb#22
486
+ def labels; end
487
+
488
+ # a hash of labels to be applied to the container
489
+ #
490
+ # @param value [Hash, nil] the value to set the attribute labels to.
491
+ # @return [Hash, nil] the newly set value
492
+ #
493
+ # source://testcontainers-core//lib/testcontainers/docker_container.rb#22
494
+ def labels=(_arg0); end
495
+
496
+ # a logger instance for the container
497
+ #
498
+ # @return [Logger] the current value of logger
499
+ #
500
+ # source://testcontainers-core//lib/testcontainers/docker_container.rb#24
501
+ def logger; end
502
+
503
+ # a logger instance for the container
504
+ #
505
+ # @param value [Logger] the value to set the attribute logger to.
506
+ # @return [Logger] the newly set value
507
+ #
508
+ # source://testcontainers-core//lib/testcontainers/docker_container.rb#24
509
+ def logger=(_arg0); end
510
+
511
+ # Returns the container's logs.
512
+ #
513
+ # @param stdout [Boolean] Whether to return stdout.
514
+ # @param stderr [Boolean] Whether to return stderr.
515
+ # @raise [ConnectionError] If the connection to the Docker daemon fails.
516
+ # @raise [ContainerNotStartedError] If the container has not been started.
517
+ # @return [Array<String>] The container's logs.
518
+ #
519
+ # source://testcontainers-core//lib/testcontainers/docker_container.rb#776
520
+ def logs(stdout: T.unsafe(nil), stderr: T.unsafe(nil)); end
521
+
522
+ # Returns the mapped host port for the given container port.
523
+ #
524
+ # @param port [Integer | String] The container port.
525
+ # @raise [ConnectionError] If the connection to the Docker daemon fails.
526
+ # @raise [ContainerNotStartedError] If the container has not been started.
527
+ # @return [Integer] The mapped host port.
528
+ #
529
+ # source://testcontainers-core//lib/testcontainers/docker_container.rb#717
530
+ def mapped_port(port); end
531
+
532
+ # Returns the container's mount names.
533
+ #
534
+ # @raise [ConnectionError] If the connection to the Docker daemon fails.
535
+ # @raise [ContainerNotStartedError] If the container has not been started.
536
+ # @return [Array<String>] The container's mount names.
537
+ #
538
+ # source://testcontainers-core//lib/testcontainers/docker_container.rb#755
539
+ def mount_names; end
540
+
541
+ # Returns the container's mounts.
542
+ #
543
+ # @raise [ConnectionError] If the connection to the Docker daemon fails.
544
+ # @raise [ContainerNotStartedError] If the container has not been started.
545
+ # @return [Array<Hash>] An array of the container's mounts.
546
+ #
547
+ # source://testcontainers-core//lib/testcontainers/docker_container.rb#746
548
+ def mounts; end
549
+
550
+ # the container's name
551
+ #
552
+ # @return [String] the current value of name
553
+ #
554
+ # source://testcontainers-core//lib/testcontainers/docker_container.rb#22
555
+ def name; end
556
+
557
+ # the container's name
558
+ #
559
+ # @param value [String] the value to set the attribute name to.
560
+ # @return [String] the newly set value
561
+ #
562
+ # source://testcontainers-core//lib/testcontainers/docker_container.rb#22
563
+ def name=(_arg0); end
564
+
565
+ # Returns whether the container is paused.
566
+ #
567
+ # @raise [ConnectionError] If the connection to the Docker daemon fails.
568
+ # @raise [ContainerNotStartedError] If the container has not been started.
569
+ # @return [Boolean] Whether the container is paused.
570
+ #
571
+ # source://testcontainers-core//lib/testcontainers/docker_container.rb#592
572
+ def paused?; end
573
+
574
+ # a hash mapping container ports to host port bindings (used for Docker API compatibility)
575
+ #
576
+ # @return [Hash, nil] the current value of port_bindings
577
+ #
578
+ # source://testcontainers-core//lib/testcontainers/docker_container.rb#22
579
+ def port_bindings; end
580
+
581
+ # a hash mapping container ports to host port bindings (used for Docker API compatibility)
582
+ #
583
+ # @param value [Hash, nil] the value to set the attribute port_bindings to.
584
+ # @return [Hash, nil] the newly set value
585
+ #
586
+ # source://testcontainers-core//lib/testcontainers/docker_container.rb#22
587
+ def port_bindings=(_arg0); end
588
+
589
+ # Reads the contents of a file inside the container.
590
+ #
591
+ # @param path [String] The path to the file.
592
+ # @raise [ContainerNotStartedError]
593
+ # @return [String] The contents of the file.
594
+ #
595
+ # source://testcontainers-core//lib/testcontainers/docker_container.rb#975
596
+ def read_file(path); end
597
+
598
+ # Removes the container.
599
+ #
600
+ # @param options [Hash] Additional options to send to the container remove command.
601
+ # @raise [ConnectionError] If the connection to the Docker daemon fails.
602
+ # @return [DockerContainer] The DockerContainer instance.
603
+ # @return [nil] If the container does not exist.
604
+ #
605
+ # source://testcontainers-core//lib/testcontainers/docker_container.rb#542
606
+ def remove(options = T.unsafe(nil)); end
607
+
608
+ # Restarts the container.
609
+ #
610
+ # @raise [ConnectionError] If the connection to the Docker daemon fails.
611
+ # @raise [ContainerNotStartedError] If the container has not been started.
612
+ # @return [DockerContainer] The DockerContainer instance.
613
+ #
614
+ # source://testcontainers-core//lib/testcontainers/docker_container.rb#558
615
+ def restart; end
616
+
617
+ # Returns whether the container is restarting.
618
+ #
619
+ # @raise [ConnectionError] If the connection to the Docker daemon fails.
620
+ # @raise [ContainerNotStartedError] If the container has not been started.
621
+ # @return [Boolean] Whether the container is restarting.
622
+ #
623
+ # source://testcontainers-core//lib/testcontainers/docker_container.rb#601
624
+ def restarting?; end
625
+
626
+ # Returns whether the container is running.
627
+ #
628
+ # @raise [ConnectionError] If the connection to the Docker daemon fails.
629
+ # @return [Boolean] Whether the container is running.
630
+ # @return [false] If the container has not been started instead of raising an ContainerNotStartedError.
631
+ #
632
+ # source://testcontainers-core//lib/testcontainers/docker_container.rb#610
633
+ def running?; end
634
+
635
+ # Starts the container.
636
+ #
637
+ # @raise [ConnectionError] If the connection to the Docker daemon fails.
638
+ # @raise [NotFoundError] If Docker is unable to find the image.
639
+ # @return [DockerContainer] The DockerContainer instance.
640
+ #
641
+ # source://testcontainers-core//lib/testcontainers/docker_container.rb#474
642
+ def start; end
643
+
644
+ # Returns the container's status.
645
+ # Possible values are: "created", "restarting", "running", "removing", "paused", "exited", "dead".
646
+ #
647
+ # @raise [ConnectionError] If the connection to the Docker daemon fails.
648
+ # @return [String] The container's status.
649
+ #
650
+ # source://testcontainers-core//lib/testcontainers/docker_container.rb#571
651
+ def status; end
652
+
653
+ # Stops the container.
654
+ #
655
+ # @param force [Boolean] Whether to force the container to stop.
656
+ # @raise [ConnectionError] If the connection to the Docker daemon fails.
657
+ # @raise [ContainerNotStartedError] If the container has not been started.
658
+ # @return [DockerContainer] The DockerContainer instance.
659
+ #
660
+ # source://testcontainers-core//lib/testcontainers/docker_container.rb#502
661
+ def stop(force: T.unsafe(nil)); end
662
+
663
+ # Stops the container forcefully.
664
+ #
665
+ # @return [DockerContainer] The DockerContainer instance.
666
+ # @see #stop
667
+ #
668
+ # source://testcontainers-core//lib/testcontainers/docker_container.rb#517
669
+ def stop!; end
670
+
671
+ # Writes the contents of a file inside the container.
672
+ #
673
+ # @param path [String] The path to the file.
674
+ # @param contents [String] The contents of the file.
675
+ # @raise [ContainerNotStartedError] If the container has not been started.
676
+ # @raise [ConnectionError] If the connection to the Docker daemon fails.
677
+ #
678
+ # source://testcontainers-core//lib/testcontainers/docker_container.rb#987
679
+ def store_file(path, contents); end
680
+
681
+ # Returns whether the container supports healthchecks.
682
+ # This is determined by the presence of a healthcheck in the container's configuration.
683
+ #
684
+ # @raise [ContainerNotStartedError] If the container has not been started.
685
+ # @return [Boolean] Whether the container supports healthchecks.
686
+ #
687
+ # source://testcontainers-core//lib/testcontainers/docker_container.rb#648
688
+ def supports_healthcheck?; end
689
+
690
+ # Starts the container, yields the container instance to the block, and stops the container.
691
+ #
692
+ # @return [DockerContainer] Wherever the block returns.
693
+ # @yield [DockerContainer] The container instance.
694
+ #
695
+ # source://testcontainers-core//lib/testcontainers/docker_container.rb#462
696
+ def use; end
697
+
698
+ # a hash mapping volume paths in the container to an empty hash (used for Docker API compatibility)
699
+ #
700
+ # @return [Hash, nil] the current value of volumes
701
+ #
702
+ # source://testcontainers-core//lib/testcontainers/docker_container.rb#22
703
+ def volumes; end
704
+
705
+ # a hash mapping volume paths in the container to an empty hash (used for Docker API compatibility)
706
+ #
707
+ # @param value [Hash, nil] the value to set the attribute volumes to.
708
+ # @return [Hash, nil] the newly set value
709
+ #
710
+ # source://testcontainers-core//lib/testcontainers/docker_container.rb#22
711
+ def volumes=(_arg0); end
712
+
713
+ # Returns the value of attribute wait_for.
714
+ #
715
+ # source://testcontainers-core//lib/testcontainers/docker_container.rb#22
716
+ def wait_for; end
717
+
718
+ # Sets the attribute wait_for
719
+ #
720
+ # @param value the value to set the attribute wait_for to.
721
+ #
722
+ # source://testcontainers-core//lib/testcontainers/docker_container.rb#22
723
+ def wait_for=(_arg0); end
724
+
725
+ # Waits for the container to be healthy.
726
+ #
727
+ # @param timeout [Integer] The number of seconds to wait for the health check to be healthy.
728
+ # @param interval [Float] The number of seconds to wait between checks.
729
+ # @raise [ContainerNotStartedError] If the container has not been started.
730
+ # @raise [TimeoutError] If the timeout is reached.
731
+ # @raise [ConnectionError] If the connection to the Docker daemon fails.
732
+ # @raise [HealthcheckNotSupportedError] If the container does not support healthchecks
733
+ # @return [Boolean] Whether the container is healthy.
734
+ #
735
+ # source://testcontainers-core//lib/testcontainers/docker_container.rb#836
736
+ def wait_for_healthcheck(timeout: T.unsafe(nil), interval: T.unsafe(nil)); end
737
+
738
+ # Waits for the container to respond to HTTP requests.
739
+ #
740
+ # @param timeout [Integer] The number of seconds to wait for the TCP connection to be established.
741
+ # @param interval [Float] The number of seconds to wait between checks.
742
+ # @param path [String] The path to request.
743
+ # @param container_port [Integer] The container port to request.
744
+ # @param https [Boolean] Whether to use TLS.
745
+ # @param status [Integer] The expected HTTP status code.
746
+ # @raise [ContainerNotStartedError] If the container has not been started.
747
+ # @raise [TimeoutError] If the timeout is reached.
748
+ # @raise [ConnectionError] If the connection to the Docker daemon fails.
749
+ # @return [Boolean] Whether the container is responding to HTTP requests.
750
+ #
751
+ # source://testcontainers-core//lib/testcontainers/docker_container.rb#891
752
+ def wait_for_http(timeout: T.unsafe(nil), interval: T.unsafe(nil), path: T.unsafe(nil), container_port: T.unsafe(nil), https: T.unsafe(nil), status: T.unsafe(nil)); end
753
+
754
+ # Waits for the container logs to match the given regex.
755
+ #
756
+ # @param matcher [Regexp] The regex to match.
757
+ # @param timeout [Integer] The number of seconds to wait for the logs to match.
758
+ # @param interval [Float] The number of seconds to wait between checks.
759
+ # @raise [ContainerNotStartedError] If the container has not been started.
760
+ # @raise [TimeoutError] If the timeout is reached.
761
+ # @raise [ConnectionError] If the connection to the Docker daemon fails.
762
+ # @return [Boolean] Whether the logs matched the regex.
763
+ #
764
+ # source://testcontainers-core//lib/testcontainers/docker_container.rb#812
765
+ def wait_for_logs(matcher, timeout: T.unsafe(nil), interval: T.unsafe(nil)); end
766
+
767
+ # Waits for the container to open the given port.
768
+ #
769
+ # @param port [Integer] The port to wait for.
770
+ # @param timeout [Integer] The number of seconds to wait for the port to open.
771
+ # @param interval [Float] The number of seconds to wait between checks.
772
+ # @raise [ContainerNotStartedError] If the container has not been started.
773
+ # @raise [TimeoutError] If the timeout is reached.
774
+ # @raise [ConnectionError] If the connection to the Docker daemon fails.
775
+ # @raise [PortNotMappedError] If the port is not mapped.
776
+ # @return [Boolean] Whether the port is open.
777
+ #
778
+ # source://testcontainers-core//lib/testcontainers/docker_container.rb#861
779
+ def wait_for_tcp_port(port, timeout: T.unsafe(nil), interval: T.unsafe(nil)); end
780
+
781
+ # Set options for the container configuration using "with_" methods.
782
+ #
783
+ # @param options [Hash] A hash of options where keys correspond to "with_" methods and values are the arguments for those methods.
784
+ # @return [DockerContainer] The updated DockerContainer instance.
785
+ #
786
+ # source://testcontainers-core//lib/testcontainers/docker_container.rb#300
787
+ def with(options); end
788
+
789
+ # Set the command for the container.
790
+ #
791
+ # @param parts [Array<String>] The command to run in the container as an array of strings.
792
+ # @return [DockerContainer] The updated DockerContainer instance.
793
+ #
794
+ # source://testcontainers-core//lib/testcontainers/docker_container.rb#317
795
+ def with_command(*parts); end
796
+
797
+ # Set the entrypoint for the container.
798
+ #
799
+ # @param parts [Array<String>] The entry point for the container as an array of strings.
800
+ # @return [DockerContainer] The updated DockerContainer instance.
801
+ #
802
+ # source://testcontainers-core//lib/testcontainers/docker_container.rb#327
803
+ def with_entrypoint(*parts); end
804
+
805
+ # Sets the container's environment variables.
806
+ #
807
+ # @param env_or_key [String, Hash, Array] The environment variable(s) to add.
808
+ # - When passing a Hash, the keys and values represent the variable names and values.
809
+ # - When passing an Array, each element should be a String in the format "KEY=VALUE".
810
+ # - When passing a String, it should be in the format "KEY=VALUE" or a key when a value is also provided.
811
+ # @param value [String, nil] The value for the environment variable if env_or_key is a key (String).
812
+ # @return [DockerContainer] The updated DockerContainer instance.
813
+ #
814
+ # source://testcontainers-core//lib/testcontainers/docker_container.rb#350
815
+ def with_env(env_or_key, value = T.unsafe(nil)); end
816
+
817
+ # Adds a single exposed port to the container.
818
+ #
819
+ # @param port [String, Integer] The port to expose.
820
+ # @return [DockerContainer] The updated DockerContainer instance.
821
+ #
822
+ # source://testcontainers-core//lib/testcontainers/docker_container.rb#377
823
+ def with_exposed_port(port); end
824
+
825
+ # Adds exposed ports to the container.
826
+ #
827
+ # @param ports [Array<String, Integer>] The list of ports to expose.
828
+ # @return [DockerContainer] The updated DockerContainer instance.
829
+ #
830
+ # source://testcontainers-core//lib/testcontainers/docker_container.rb#368
831
+ def with_exposed_ports(*ports); end
832
+
833
+ # Adds filesystem binds to the container.
834
+ #
835
+ # @param filesystem_binds [Array, String, Hash] an array, string, or hash of filesystem binds.
836
+ # @return [DockerContainer] The updated DockerContainer instance.
837
+ #
838
+ # source://testcontainers-core//lib/testcontainers/docker_container.rb#408
839
+ def with_filesystem_binds(filesystem_binds); end
840
+
841
+ # Adds a fixed exposed port to the container.
842
+ #
843
+ # @param container_port [String, Integer, Hash] The container port in the format "port/protocol" or as an integer.
844
+ # When passing a Hash, it should contain a single key-value pair with the container port as the key and the host port as the value.
845
+ # @param host_port [Integer, nil] The host port to bind the container port to.
846
+ # @return [DockerContainer] The updated DockerContainer instance.
847
+ #
848
+ # source://testcontainers-core//lib/testcontainers/docker_container.rb#388
849
+ def with_fixed_exposed_port(container_port, host_port = T.unsafe(nil)); end
850
+
851
+ # Adds a healthcheck to the container.
852
+ #
853
+ # @option options
854
+ # @option options
855
+ # @option options
856
+ # @option options
857
+ # @option options
858
+ # @param options [Hash] the healthcheck options.
859
+ # @return [DockerContainer] The updated DockerContainer instance.
860
+ #
861
+ # source://testcontainers-core//lib/testcontainers/docker_container.rb#441
862
+ def with_healthcheck(options = T.unsafe(nil)); end
863
+
864
+ # Adds a label to the container.
865
+ #
866
+ # @param label [String] the label key.
867
+ # @param value [String] the label value.
868
+ # @return [DockerContainer] The updated DockerContainer instance.
869
+ #
870
+ # source://testcontainers-core//lib/testcontainers/docker_container.rb#427
871
+ def with_label(label, value); end
872
+
873
+ # Adds labels to the container.
874
+ #
875
+ # @param labels [Hash] the labels to add.
876
+ # @return [DockerContainer] The updated DockerContainer instance.
877
+ #
878
+ # source://testcontainers-core//lib/testcontainers/docker_container.rb#417
879
+ def with_labels(labels); end
880
+
881
+ # Set the name of the container.
882
+ #
883
+ # @param name [String] The name of the container.
884
+ # @return [DockerContainer] The updated DockerContainer instance.
885
+ #
886
+ # source://testcontainers-core//lib/testcontainers/docker_container.rb#337
887
+ def with_name(name); end
888
+
889
+ # Adds a fixed exposed port to the container.
890
+ #
891
+ # @param container_port [String, Integer, Hash] The container port in the format "port/protocol" or as an integer.
892
+ # When passing a Hash, it should contain a single key-value pair with the container port as the key and the host port as the value.
893
+ # @param host_port [Integer, nil] The host port to bind the container port to.
894
+ # @return [DockerContainer] The updated DockerContainer instance.
895
+ # @see #with_fixed_exposed_port
896
+ #
897
+ # source://testcontainers-core//lib/testcontainers/docker_container.rb#388
898
+ def with_port_binding(container_port, host_port = T.unsafe(nil)); end
899
+
900
+ # Adds volumes to the container.
901
+ #
902
+ # @param volumes [Hash] a hash of volume key-value pairs.
903
+ # @return [DockerContainer] The updated DockerContainer instance.
904
+ #
905
+ # source://testcontainers-core//lib/testcontainers/docker_container.rb#400
906
+ def with_volumes(volumes = T.unsafe(nil)); end
907
+
908
+ # Add a wait_for strategy to the container configuration.
909
+ #
910
+ # @param method [Symbol, String, Proc, Array] The method to call on the container to wait for it to be ready.
911
+ # @param args [Array] The arguments to pass to the method if it is a symbol or string.
912
+ # @param kwargs [Hash] The keyword arguments to pass to the method if it is a symbol or string.
913
+ # @param block [Proc] The block to call on the container to wait for it to be ready.
914
+ # @return [DockerContainer] The updated DockerContainer instance.
915
+ #
916
+ # source://testcontainers-core//lib/testcontainers/docker_container.rb#453
917
+ def with_wait_for(method = T.unsafe(nil), *args, **kwargs, &block); end
918
+
919
+ # Sets the container's working directory.
920
+ #
921
+ # @param working_dir [String] the working directory for the container.
922
+ # @return [DockerContainer] The updated DockerContainer instance.
923
+ #
924
+ # source://testcontainers-core//lib/testcontainers/docker_container.rb#359
925
+ def with_working_dir(working_dir); end
926
+
927
+ # the working directory for the container
928
+ #
929
+ # @return [String, nil] the current value of working_dir
930
+ #
931
+ # source://testcontainers-core//lib/testcontainers/docker_container.rb#22
932
+ def working_dir; end
933
+
934
+ # the working directory for the container
935
+ #
936
+ # @param value [String, nil] the value to set the attribute working_dir to.
937
+ # @return [String, nil] the newly set value
938
+ #
939
+ # source://testcontainers-core//lib/testcontainers/docker_container.rb#22
940
+ def working_dir=(_arg0); end
941
+
942
+ private
943
+
944
+ # source://testcontainers-core//lib/testcontainers/docker_container.rb#1115
945
+ def _container_create_options; end
946
+
947
+ # source://testcontainers-core//lib/testcontainers/docker_container.rb#1070
948
+ def container_bridge_ip; end
949
+
950
+ # source://testcontainers-core//lib/testcontainers/docker_container.rb#1074
951
+ def container_gateway_ip; end
952
+
953
+ # source://testcontainers-core//lib/testcontainers/docker_container.rb#1078
954
+ def container_port(port); end
955
+
956
+ # source://testcontainers-core//lib/testcontainers/docker_container.rb#1082
957
+ def container_ports; end
958
+
959
+ # source://testcontainers-core//lib/testcontainers/docker_container.rb#1087
960
+ def default_gateway_ip; end
961
+
962
+ # source://testcontainers-core//lib/testcontainers/docker_container.rb#1096
963
+ def docker_host; end
964
+
965
+ # source://testcontainers-core//lib/testcontainers/docker_container.rb#1028
966
+ def normalize_filesystem_binds(filesystem_binds); end
967
+
968
+ # source://testcontainers-core//lib/testcontainers/docker_container.rb#1004
969
+ def normalize_port(port); end
970
+
971
+ # source://testcontainers-core//lib/testcontainers/docker_container.rb#1010
972
+ def normalize_port_bindings(port_bindings); end
973
+
974
+ # source://testcontainers-core//lib/testcontainers/docker_container.rb#995
975
+ def normalize_ports(ports); end
976
+
977
+ # source://testcontainers-core//lib/testcontainers/docker_container.rb#1019
978
+ def normalize_volumes(volumes); end
979
+
980
+ # source://testcontainers-core//lib/testcontainers/docker_container.rb#1042
981
+ def process_env_input(env_or_key, value = T.unsafe(nil)); end
982
+ end
983
+
984
+ # source://testcontainers-core//lib/testcontainers.rb#11
985
+ class Testcontainers::Error < ::StandardError; end
986
+
987
+ # Alias for forward-compatibility
988
+ #
989
+ # source://testcontainers-core//lib/testcontainers/docker_container.rb#1136
990
+ Testcontainers::GenericContainer = Testcontainers::DockerContainer
991
+
992
+ # source://testcontainers-core//lib/testcontainers.rb#21
993
+ class Testcontainers::HealthcheckNotSupportedError < ::Testcontainers::Error; end
994
+
995
+ # source://testcontainers-core//lib/testcontainers.rb#15
996
+ class Testcontainers::NotFoundError < ::Testcontainers::Error; end
997
+
998
+ # source://testcontainers-core//lib/testcontainers.rb#23
999
+ class Testcontainers::PortNotMappedError < ::Testcontainers::Error; end
1000
+
1001
+ # source://testcontainers-core//lib/testcontainers.rb#17
1002
+ class Testcontainers::TimeoutError < ::Testcontainers::Error; end
1003
+
1004
+ # source://testcontainers-core//lib/testcontainers/version.rb#4
1005
+ Testcontainers::VERSION = T.let(T.unsafe(nil), String)