Create rootfs for docker
In your new project add folder
runner. This dir for shell scripts(bash). Put
entrypoint.sh script in
runner this script will run first.
Next step. Put in project
# Build rootfs for php build: @docker run --rm \ -v $(CURDIR)/runner:/runner \ -v $(CURDIR)/build:/build \ -v $(CURDIR)/src:/src \ imega/base-builder \ # this packages installed for your image --packages=" \ git \ php7 \ php7-common@testing \ " \ # this packages installed for auxiliary tools -d="curl" .PHONY: build
- -p --packages - this packages installed for your image
- -d --dev-packages - this packages installed for auxiliary tools
You will receive a rootfs.tar.gz in a folder build.
Build your image
Put Docker file in project. e.g.
FROM imega/base-builder:1.2.0 MAINTAINER Dmitry Gavriloff <email@example.com> ADD build/rootfs.tar.gz / ENTRYPOINT ["php"]
$docker run build -t test-image .
You are allowed to use variables:
- $ROOTFS - This directory is the root of the file system.
- $SRC - This directory will be mounted in builder.
You need to transfer configs in their way. Configs you place in
SRC directory. Put command in
cp $SRC/daemon.sh $ROOTFS/app/daemon.sh cp $SRC/rsyncd.conf $ROOTFS/etc/rsyncd.conf
All packages can be found at http://pkgs.alpinelinux.org/packages. Specifying only the package name it will be taken from the main repository.
After adding a prefix to the package you will be able to determine the Eje repository. The available prefixes is
php7-common@community from http://dl-cdn.alpinelinux.org/alpine/edge/community
The MIT License (MIT)
Copyright © 2016 iMega firstname.lastname@example.org
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.