-
Notifications
You must be signed in to change notification settings - Fork 10
Creation of rebuild environments
New environment is created with rbld create
:
[test@rebuild-fedora23-1 ~]$ rbld create --base ubuntu:15.10 ubuntu1510
Downloading the base image...
Trying to pull repository docker.io/library/ubuntu ... 15.10: Pulling from library/ubuntu
...
Successfully created ubuntu1510:initial
ubuntu:15.10
in this example is a name of Ubuntu 15.10 image from Docker Hub's.
Or:
[test@rebuild-fedora23-1 ~]$ rbld create --basefile alpine34.tar.gz alpine34
Building environment...
...
Successfully created alpine34:initial
alpine34.tar.gz
in this example is a name of archive with compressed file system snapshot of Alpine Linux 3.4.
Created or deployed environment may be modified with rbld modify
. Just as running environments there are two modes.
You can modify the environment in immediate mode with rbld modify [ENV] -- [COMMAND]
:
[test@rebuild-fedora23-1 ~]$ rbld modify ubuntu1510 -- \
"sudo apt-get update && \
sudo apt-get install -y gcc"
Initializing environment [.....]
>>> rebuild env ubuntu1510:initial-M
>>> sudo apt-get update && sudo apt-get install -y gcc
Hit http://archive.ubuntu.com wily InRelease
...
Processing triggers for libc-bin (2.21-0ubuntu4.3) ...
<<< rebuild env ubuntu1510:initial-M
You can modify the environment in interactive mode with rbld modify [ENV]
:
[test@rebuild-fedora23-1 ~]$ rbld modify ubuntu1510:initial
Initializing environment [.....]
>>> rebuild env ubuntu1510:initial-M interactive
>>> Press CTRL-D do leave
test@ubuntu1510:initial-M:~$
Environment-wide variables may be defined via rebuild.rc
:
[test@rebuild-fedora23-1 ~]$ rbld modify ubuntu1510:initial
Initializing environment [.....]
>>> rebuild env ubuntu1510:initial-M interactive
>>> Press CTRL-D do leave
test@ubuntu1510:initial-M:~$ sudo vi /rebuild/rebuild.rc
test@ubuntu1510:initial-M:~$ cat /rebuild/rebuild.rc
# This is the rebuild environment definition file.
# Define required environment variables here.
#
# NOTE: Make sure to prefix definitions with
# 'export' directive, i.e.
#export MY_PATH=/path/to/some/location
export CC=clang
test@ubuntu1510:initial-M:~$ exit
<<< rebuild env ubuntu1510:initial-M
List of modified environments may be viewed with rbld status
:
[test@rebuild-fedora23-1 ~]$ rbld status
modified: ubuntu1510:initial
Modified environment is committed with new tag by rbld commit
:
[test@rebuild-fedora23-1 ~]$ rbld commit --tag v001 ubuntu1510:initial
Creating new environment ubuntu1510:v001...
Instead of committing one may revert environment changes by rbld checkout
:
[test@rebuild-fedora23-1 ~]$ rbld checkout ubuntu1510:initial
Committed environment may be deleted with rbld rm
:
[test@rebuild-fedora23-1 ~]$ rbld rm ubuntu1510:initial