@@ -199,25 +199,13 @@ pub(crate) enum ImageOpts {
199
199
///
200
200
/// Note that these are distinct from images stored via e.g. `podman`.
201
201
List ,
202
- /// Copy a container image from the bootc storage to a target.
203
- ///
204
- /// ## Copying the booted container image to containers-storage: (podman)
202
+ /// Copy a container image from the bootc storage to `containers-storage:`.
205
203
///
206
204
/// The source and target are both optional; if both are left unspecified,
207
- /// via a simple invocation of `bootc image push `, then the default is to
205
+ /// via a simple invocation of `bootc image copy-to-storage `, then the default is to
208
206
/// push the currently booted image to `containers-storage` (as used by podman, etc.)
209
207
/// and tagged with the image name `localhost/bootc`,
210
208
///
211
- /// ## Copying the booted container image to a remote registry
212
- ///
213
- /// Aside from the special case above, default transport is `registry`. This
214
- /// means that an invocation of
215
- ///
216
- /// `bootc image push --target quay.io/example/someimage:latest` will push the
217
- /// booted container image to the target registry. This will be done via an
218
- /// invocation equivalent to `skopeo copy`, and hence the defaults for that apply.
219
- /// For example, the default registry authentication file applies.
220
- ///
221
209
/// ## Copying a non-default container image
222
210
///
223
211
/// It is also possible to copy an image other than the currently booted one by
@@ -227,13 +215,7 @@ pub(crate) enum ImageOpts {
227
215
///
228
216
/// At the current time there is no explicit support for pulling images other than indirectly
229
217
/// via e.g. `bootc switch` or `bootc upgrade`.
230
- Push {
231
- /// The transport; e.g. oci, oci-archive, containers-storage. Defaults to `registry`.
232
- ///
233
- /// For more information, see `man containers-transports`.
234
- #[ clap( long, default_value = "registry" ) ]
235
- transport : String ,
236
-
218
+ CopyToStorage {
237
219
#[ clap( long) ]
238
220
/// The source image; if not specified, the booted image will be used.
239
221
source : Option < String > ,
@@ -794,13 +776,8 @@ async fn run_from_opt(opt: Opt) -> Result<()> {
794
776
} ,
795
777
Opt :: Image ( opts) => match opts {
796
778
ImageOpts :: List => crate :: image:: list_entrypoint ( ) . await ,
797
- ImageOpts :: Push {
798
- transport,
799
- source,
800
- target,
801
- } => {
802
- let transport = Transport :: try_from ( transport. as_str ( ) ) ?;
803
- crate :: image:: push_entrypoint ( transport, source. as_deref ( ) , target. as_deref ( ) ) . await
779
+ ImageOpts :: CopyToStorage { source, target } => {
780
+ crate :: image:: push_entrypoint ( source. as_deref ( ) , target. as_deref ( ) ) . await
804
781
}
805
782
} ,
806
783
#[ cfg( feature = "install" ) ]
0 commit comments