This repository has been archived by the owner on Jun 12, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
72 changed files
with
422 additions
and
253 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,14 @@ | ||
FROM progrium/cedarish:cedar14 | ||
MAINTAINER Fabio Rehm "[email protected]" | ||
|
||
# TODO: Move this to a single ENV line to reduce layers once Docker Hub supports it | ||
ENV HOME /home/devstep | ||
ENV DEVSTEP_PATH /opt/devstep | ||
ENV DEVSTEP_CONF /etc/devstep | ||
ENV LANG en_US.UTF-8 | ||
ENV LC_ALL en_US.UTF-8 | ||
ENV LC_CTYPE en_US.UTF-8 | ||
|
||
##################################################################### | ||
# Create a default user to avoid using the container as root, we set | ||
# the user and group ids to 1000 as it is the most common ids for | ||
|
@@ -13,11 +21,14 @@ RUN DEBIAN_FRONTEND=noninteractive && \ | |
apt-get install -y sudo && \ | ||
apt-get clean && \ | ||
rm -rf /var/lib/apt/lists/* && \ | ||
mkdir -p /.devstep/cache && \ | ||
mkdir -p /.devstep/.profile.d && \ | ||
mkdir -p /.devstep/bin && \ | ||
mkdir -p /.devstep/log && \ | ||
echo "developer:x:1000:1000:Developer,,,:/.devstep:/bin/bash" >> /etc/passwd && \ | ||
mkdir -p $HOME/cache && \ | ||
mkdir -p $HOME/.profile.d && \ | ||
mkdir -p $HOME/bin && \ | ||
mkdir -p $HOME/log && \ | ||
mkdir -p $DEVSTEP_PATH/bin && \ | ||
mkdir -p $DEVSTEP_CONF/service && \ | ||
mkdir -p $DEVSTEP_CONF/init.d && \ | ||
echo "developer:x:1000:1000:Developer,,,:/home/devstep:/bin/bash" >> /etc/passwd && \ | ||
echo "developer:x:1000:" >> /etc/group && \ | ||
echo "developer ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/developer && \ | ||
chmod 0440 /etc/sudoers.d/developer | ||
|
@@ -29,13 +40,9 @@ RUN DEBIAN_FRONTEND=noninteractive && \ | |
apt-get update && \ | ||
apt-get install -y python runit --no-install-recommends && \ | ||
apt-get clean && \ | ||
rm -rf /var/lib/apt/lists/* && \ | ||
mkdir -p /etc/my_init.d && \ | ||
mkdir -p /etc/service | ||
rm -rf /var/lib/apt/lists/* | ||
|
||
##################################################################### | ||
# * Install dependencies for rubies, php and possibly other programming | ||
# language envs as well | ||
# * Install and configure PostgreSQL and MySQL clients | ||
# * Install bash-completion to save us a few keystrokes | ||
# * Install vim because editing files with plain old vi sucks | ||
|
@@ -49,17 +56,17 @@ RUN DEBIAN_FRONTEND=noninteractive && \ | |
|
||
RUN DEBIAN_FRONTEND=noninteractive && \ | ||
apt-get update && \ | ||
apt-get install -y gawk libreadline5 libmcrypt4 libaprutil1 libreadline6-dev libyaml-dev libgdbm-dev libncurses5-dev libffi-dev libicu-dev --no-install-recommends && \ | ||
apt-get install -y postgresql-client mysql-client --no-install-recommends && \ | ||
apt-get install -y software-properties-common bash-completion --no-install-recommends && \ | ||
echo "[client]\nprotocol=tcp\nuser=root" >> /.devstep/.my.cnf && \ | ||
echo "export PGHOST=localhost" >> /.devstep/.profile.d/postgresql.sh && \ | ||
echo "export PGUSER=postgres" >> /.devstep/.profile.d/postgresql.sh && \ | ||
apt-get install -y libreadline5 libmcrypt4 libffi-dev --no-install-recommends && \ | ||
apt-get install -y postgresql-client mysql-client libsqlite3-dev --no-install-recommends && \ | ||
apt-get install -y --force-yes vim htop tmux mercurial bzr nodejs libssl0.9.8 --no-install-recommends && \ | ||
apt-get install -y software-properties-common bash-completion --no-install-recommends && \ | ||
echo "[client]\nprotocol=tcp\nuser=root" >> $HOME/.my.cnf && \ | ||
echo "export PGHOST=localhost" >> $HOME/.profile.d/postgresql.sh && \ | ||
echo "export PGUSER=postgres" >> $HOME/.profile.d/postgresql.sh && \ | ||
apt-get clean && \ | ||
rm -rf /var/lib/apt/lists/* && \ | ||
mkdir -p /.devstep/bin && \ | ||
curl -L -s http://stedolan.github.io/jq/download/linux64/jq > /.devstep/bin/jq | ||
curl -L -s http://stedolan.github.io/jq/download/linux64/jq > $DEVSTEP_PATH/bin/jq && \ | ||
chmod +x $DEVSTEP_PATH/bin/jq | ||
|
||
##################################################################### | ||
# Bring back apt .deb caching as they'll be either removed on the | ||
|
@@ -69,44 +76,38 @@ RUN rm /etc/apt/apt.conf.d/docker-clean | |
##################################################################### | ||
# Devstep buildpacks | ||
|
||
ADD buildpacks /.devstep/buildpacks | ||
RUN for script in /.devstep/buildpacks/*/bin/install-dependencies; do \ | ||
ADD stack/buildpacks $DEVSTEP_PATH/buildpacks | ||
RUN for script in $DEVSTEP_PATH/buildpacks/*/bin/install-dependencies; do \ | ||
$script; \ | ||
done | ||
|
||
##################################################################### | ||
# Devstep goodies (ADDed at the end to increase image "cacheability") | ||
|
||
ADD stack/bin /.devstep/bin | ||
ADD stack/bashrc /.devstep/.bashrc | ||
ADD stack/load-env.sh /.devstep/load-env.sh | ||
ADD addons /.devstep/addons | ||
ADD stack /opt/devstep | ||
|
||
##################################################################### | ||
# Fix permissions, set up init and generate locales | ||
RUN chown -R developer:developer /.devstep && \ | ||
chown -R developer:developer /etc/my_init.d && \ | ||
chown -R developer:developer /etc/service && \ | ||
# Fix permissions, set up init | ||
RUN cp $DEVSTEP_PATH/bashrc $HOME/.bashrc && \ | ||
chown -R developer:developer $HOME && \ | ||
chown -R developer:developer $DEVSTEP_PATH && \ | ||
chown -R developer:developer $DEVSTEP_CONF && \ | ||
chmod u+s /usr/bin/sudo && \ | ||
ln -s /.devstep/bin/fix-permissions /etc/my_init.d/05-fix-permissions.sh && \ | ||
ln -s /.devstep/bin/create-cache-symlinks /etc/my_init.d/10-create-cache-symlinks.sh && \ | ||
ln -s /.devstep/bin/forward-linked-ports /etc/my_init.d/10-forward-linked-ports.sh && \ | ||
chmod +x /.devstep/bin/* && \ | ||
chmod +x /etc/my_init.d/* && \ | ||
locale-gen en_US.UTF-8 | ||
ln -s $DEVSTEP_PATH/bin/fix-permissions $DEVSTEP_CONF/init.d/05-fix-permissions.sh && \ | ||
ln -s $DEVSTEP_PATH/bin/create-cache-symlinks $DEVSTEP_CONF/init.d/10-create-cache-symlinks.sh && \ | ||
ln -s $DEVSTEP_PATH/bin/forward-linked-ports $DEVSTEP_CONF/init.d/10-forward-linked-ports.sh && \ | ||
chmod +x $DEVSTEP_PATH/bin/* && \ | ||
chmod +x $DEVSTEP_CONF/init.d/* | ||
|
||
##################################################################### | ||
# Setup locales and default user | ||
# Setup default user | ||
|
||
USER developer | ||
ENV HOME /.devstep | ||
ENV LANG en_US.UTF-8 | ||
ENV LC_ALL en_US.UTF-8 | ||
ENV LC_CTYPE en_US.UTF-8 | ||
ENV USER developer | ||
|
||
##################################################################### | ||
# Use our init | ||
ENTRYPOINT ["/.devstep/bin/entrypoint"] | ||
ENTRYPOINT ["/opt/devstep/bin/entrypoint"] | ||
|
||
# Start a bash session by default | ||
CMD ["/bin/bash"] |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
FROM fgrehm/devstep:v0.2.0 | ||
FROM fgrehm/devstep:v0.3.0 | ||
|
||
##################################################################### | ||
# Add project to the image and build it | ||
ONBUILD ADD . /workspace | ||
ONBUILD WORKDIR /workspace | ||
ONBUILD RUN CLEANUP=1 /.devstep/bin/build-project /workspace | ||
ONBUILD RUN CLEANUP=1 /opt/devstep/bin/build-project /workspace |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,13 @@ | ||
# Docker Addon | ||
-------------- | ||
|
||
This addon will install the latest Docker version from https://get.docker.io/builds/Linux/x86_64/docker-latest | ||
This addon will install Docker 1.3.0 from https://get.docker.io/builds/Linux/x86_64 | ||
and will set things up for running nested Docker containers based on https://github.com/jpetazzo/dind. | ||
|
||
In order to use it, you need to provide both the `--privileged` flag and because | ||
`/var/lib/docker` cannot be on AUFS, so we need to make it a volume with `-v /var/lib/docker`. | ||
|
||
To install it you can run `configure-addons docker` from within the container. | ||
|
||
To specify a Docker version, use the the `DEVSTEP_DOCKER_VERSION` environmental | ||
variable. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# Heroku Toolbelt Addon | ||
----------------------- | ||
|
||
This addon will install the latest [Heroku Toolbelt](https://toolbelt.heroku.com/) | ||
version available for the Ubuntu 14.04 release. | ||
|
||
To install it you can run `configure-addons oracle-java-8` from within the container. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# Oracle Java Addon | ||
------------------- | ||
|
||
This addon will install the latest version available for the Ubuntu 14.04 release | ||
and will leverage Devstep's caching mechanism so that the downloaded files are | ||
reused between environments. | ||
|
||
To install it you can run `configure-addons oracle-java-8` from within the container. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,23 @@ | ||
# Inline buildpack | ||
------------------ | ||
|
||
This is a buildpack for projects that wish to build themselves and is based on | ||
https://github.com/kr/heroku-buildpack-inline and it expects the project to | ||
provide the usual buildpack executables in its source tree. | ||
This is a buildpack for projects that wish to build themselves and is partially | ||
based on https://github.com/kr/heroku-buildpack-inline | ||
|
||
If an executable file is found under `bin/compile` of the project root, this | ||
buildpack will simply call it. | ||
First, it checks if there is a `provision` directive on `devstep.yml` under | ||
the project's root and it uses the instructions provided during container | ||
provisioning. | ||
|
||
For example: | ||
|
||
```yaml | ||
provision: | ||
- ['configure-addons', 'redis'] | ||
- ['configure-addons', 'heroku-toolbelt'] | ||
``` | ||
Will configure the Redis and Heroku toolbelt addons. | ||
If no `provision` instructions are found, the buildpack will look for an | ||
executable file under `bin/compile` of the project root and will run the script | ||
if found. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.