Photon is a small RPM-based Linux distribution that is optimized for running containers. This repository is intended for developers wishing to modify Photon and build their own customized ISO images. For those interested in an ISO image that is ready to use, please download from the following location:
https://dl.bintray.com/vmware/photon/iso/1.0TP1/x86_64/
photon/
├── Makefile
├── README
├── SPECS # RPM SPEC files
├── cloud-init.md
├── gce.md
├── installer # Installer used at runtime
└── support
Assuming you checked out the workspace under $HOME/workspaces/photon
.
cd $HOME/workspaces/photon
sudo make iso
Deliverable will be created at $HOME/workspaces/photon/stage/photon.iso
mkdir $HOME/photon-cache
sudo make iso PHOTON_CACHE_PATH=$HOME/photon-cache
Directory format of PHOTON_CACHE_PATH
is as follows.
photon-cache/
├──tools-build.tar.gz
├──RPMS/x86-64/*.rpm
└──RPMX/noarch/*.rpm
mkdir $HOME/photon-sources
sudo make iso PHOTON_SOURCES_PATH=$HOME/photon-sources
Directory format of PHOTON_SOURCES_PATH
is as follows.
photon-sources/
├──src1.tar.gz
├──src2.tar.gz
└──...
- Check toolchain pre-requisites
$HOME/workspaces/photon/support/toolchain/version-check.sh
- Make toolchain
$HOME/workspaces/photon
sudo make toolchain
Pre-requisites :
- Build O/S : Ubuntu 14.04 (or later) 64 bit
- Packages: bison, gawk, g++, createrepo, python-aptdaemon, genisoimage, texinfo, python-requests
sudo apt-get -y install bison gawk g++ createrepo python-aptdaemon genisoimage texinfo python-requests
Make sure /bin/sh
is a symbolic link pointing to /bin/bash
If /bin/sh
is pointing /bin/dash
, execute the following:
rm -f /bin/sh
ln -s /bin/bash /bin/sh
$HOME/workspaces/photon/stage/LOGS
A Vagrantfile
is available to ensure a quick standup of a development/build environment for Photon, this Vagrantfile uses a box called photon-build-machine
box that is created through a Packer template available under support/packer-templates
, see the README.md for more information on how to build photon-build-machine
.
As with the build-machine a Packer template is available under support/packer-templates
to build a Photon based Vagrant box running Docker, see the README.md for more information on how to build.
Convenience make targets also exist to build both the photon-build-machine
and the photon
Packer templates as well as building a fresh ISO using the photon-build-machine
. See the README.md for more details.