Skip to content
This repository was archived by the owner on Feb 24, 2020. It is now read-only.
This repository was archived by the owner on Feb 24, 2020. It is now read-only.

run from a local file UX #715

@philips

Description

@philips

Currently running from a file uses heuristics on whether the file exists or not. This can be very nice for example:

cd $HOME/src
cd github.com/appc/spec
./build
rkt run bin/ace-validator-main.aci

But can also lead to trouble based on context:

cd $HOME/src
./github.com/coreos/rocket/bin/rkt run github.com/coreos/etcd
github.com/coreos/etcd: error reading image header: read github.com/coreos/etcd: is a directory

The problem is that we have two ways to run a container without a scheme. The first way is to use appc style discovery for something like coreos.com/etcd and the other is for a file on disk like bin/ace-validator-main.aci.

I think keeping the discovery mechanism schemeless is desirable since part of the point is that it is about naming and not transport. Which leaves us with putting a scheme on the local import. Unfortunately, file:// has lots of strange UX problems. Another option is to detect whether it is a path, so detecting /, ../ or ./ as the leading characters.

This changes our example from:

rkt run ace-validator-main.aci

to

rkt run ./ace-validator-main.aci

And very likely we will want to warn like this:

rkt run ace-validator-main.aci
Warning: ace-validator-main.aci is a local file if you intended to run this use: rkt run ./ace-validator-main.aci

/cc @robszumski @iaguis
Related to: appc/docker2aci#37

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions