# %CopyrightBegin%
#
# SPDX-License-Identifier: Apache-2.0
#
# Copyright Ericsson AB 2021-2025. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# %CopyrightEnd%

To move an image, do:

On src machine:

$ docker run -itd --rm -p 1234 REPOSITORY:TAG
$ docker export XYZ -o FIL
$ scp FIL  hans@laura.otp.ericsson.se:/ldisk/hans/docker
$ docker kill THE_DOCKER_REF

On dst machine:

hans$ chmod a+r FIL
$ docker import FIL ssh_compat:bld
$ docker build -t REPOSITORY:TAG -f DF .
$ docker rmi ssh_compat:bld

(DF contains:
FROM ssh_compat:bld
    
# Start the daemon, but keep it in foreground to avoid killing the container
CMD /buildroot/ssh/sbin/sshd -D -p 1234

)
