Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated readme #115

Merged
merged 4 commits into from
Nov 7, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
82 changes: 47 additions & 35 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,26 +9,26 @@ A Fedora 32 `Vagrantfile` is included to provide a ready-to-use environment. Oth
## Quick Start
Start the Vagrant VM and SSH in.
```console
$ vagrant up
$ vagrant ssh
vagrant up
vagrant ssh
```

Activate the Python venv
```console
$ cd ~/bundlegen
$ source .venv/bin/activate
cd ~/bundlegen
source .venv/bin/activate
```

Run BundleGen:

If using an image generated by the DAC SDK, then run
```console
$ bundlegen generate --platform <platform-name> <img-url> <output-dir>
bundlegen generate --platform <platform-name> <img-url> <output-dir>
```

If using an image from a generic OCI registry (not built by the DAC SDK), then run
```console
$ bundlegen generate --platform <platform-name> --appmetadata <path-to-app-metadata> <img-url> <output-dir>
bundlegen generate --platform <platform-name> --appmetadata <path-to-app-metadata> <img-url> <output-dir>
```

Note the image URL should be in the form `docker://image-url`. If the image is on the Docker Hub, the full URL can be omitted - e.g `docker://hello-world`.
Expand Down Expand Up @@ -61,17 +61,23 @@ For development, you will need Python >=3.7 installed and configured. Once insta
It's easier to work in Fedora as the OCI tooling is already available
```bash
# Install dependencies
$ sudo dnf upgrade -y
$ sudo dnf install -y make git skopeo go go-md2man
sudo dnf upgrade -y
sudo dnf install -y make git skopeo go go-md2man
# Install Go
$ mkdir -p $HOME/go
$ echo 'export GOPATH=$HOME/go' >> $HOME/.bashrc
$ source $HOME/.bashrc
mkdir -p $HOME/go
echo 'export GOPATH=$HOME/go' >> $HOME/.bashrc
source $HOME/.bashrc
# Build/install umoci
$ go get -d github.com/opencontainers/umoci
$ cd $GOPATH/src/github.com/opencontainers/umoci/
$ make
$ sudo make install
go get -d github.com/opencontainers/umoci
cd $GOPATH/src/github.com/opencontainers/umoci/
make
sudo make install

# Setup virtual envioment
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
pip install --editable .
```

### Ubuntu >=18.04
Expand All @@ -80,28 +86,34 @@ Note Skopeo only publishes packages for Ubuntu 18.04 or newer. It may be possibl

```bash
# Install dependencies
$ sudo apt update
$ sudo apt upgrade
$ sudo apt install -y make git go-md2man
sudo apt update
sudo apt upgrade
sudo apt install -y make git go-md2man
# Install Go 1.13
$ wget https://dl.google.com/go/go1.13.12.linux-amd64.tar.gz
$ tar -xvf go1.13.12.linux-amd64.tar.gz
$ sudo mv go /usr/local
$ mkdir -p $HOME/go
$ echo 'export GOPATH=$HOME/go' >> $HOME/.bashrc
$ echo 'export GOROOT=/usr/local/go' >> $HOME/.bashrc
$ echo 'export PATH=$GOPATH/bin:$GOROOT/bin:$PATH' >> $HOME/.bashrc
$ source $HOME/.bashrc
wget https://dl.google.com/go/go1.13.12.linux-amd64.tar.gz
tar -xvf go1.13.12.linux-amd64.tar.gz
sudo mv go /usr/local
mkdir -p $HOME/go
echo 'export GOPATH=$HOME/go' >> $HOME/.bashrc
echo 'export GOROOT=/usr/local/go' >> $HOME/.bashrc
echo 'export PATH=$GOPATH/bin:$GOROOT/bin:$PATH' >> $HOME/.bashrc
source $HOME/.bashrc
# Build/install umoci
$ go get -d github.com/opencontainers/umoci
$ cd $GOPATH/src/github.com/opencontainers/umoci/
$ make
$ sudo make install
go get -d github.com/opencontainers/umoci
cd $GOPATH/src/github.com/opencontainers/umoci/
make
sudo make install
# Install skopeo
$ . /etc/os-release
$ sudo sh -c "echo 'deb http://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/x${NAME}_${VERSION_ID}/ /' > /etc/apt/sources.list.d/devel:kubic:libcontainers:stable.list"
$ wget -nv https://download.opensuse.org/repositories/devel:kubic:libcontainers:stable/x${NAME}_${VERSION_ID}/Release.key -O- | sudo apt-key add -
$ sudo apt update && sudo apt install skopeo
. /etc/os-release
sudo sh -c "echo 'deb http://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/x${NAME}_${VERSION_ID}/ /' > /etc/apt/sources.list.d/devel:kubic:libcontainers:stable.list"
wget -nv https://download.opensuse.org/repositories/devel:kubic:libcontainers:stable/x${NAME}_${VERSION_ID}/Release.key -O- | sudo apt-key add -
sudo apt update && sudo apt install skopeo

# Setup virtual envioment
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
pip install --editable .
```

---
Expand All @@ -114,4 +126,4 @@ Licensed under the Apache License, Version 2.0 (the "License"); you may not use

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.
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.