Commit 9c7242e6 by Ned Batchelder

Parameterize Dockerfiles for Open edX releases

parent 2d984835
......@@ -37,6 +37,35 @@ make docker.pkg.<service> # Package <service> for publishing to Dockerhub. Th
make docker.push.<service> # Push <service> to Dockerhub as latest.
```
## Image naming
Images built from master branches are named `edxops/<service>`, for example,
`edxops/edxapp`. Images built from Open edX release branches include the
short release name: `edxops/ficus/edxapp`. Both images will have a `:latest`
version.
## Build arguments
Dockerfiles make use of these build arguments:
* `OPENEDX_RELEASE` is the release branch to use. It defaults to "master".
To use an Open edX release, provide the full branch name:
```
--build-arg OPENEDX_RELEASE=open-release/ficus.master
```
* `IMAGE_PREFIX` is the release branch component to add to images. It defaults
to an empty string for master builds. For Open edX release, use the short
name of the release, with a trailing slash:
```
--build-arg IMAGE_PREFIX=ficus/
```
## Conventions
In order to facilitate development, Dockerfiles should be based on
......
......@@ -8,7 +8,8 @@
# with the currently checked-out configuration repo.
FROM edxops/xenial-common:latest
ARG IMAGE_PREFIX
FROM edxops/${IMAGE_PREFIX}xenial-common:latest
MAINTAINER edxops
USER root
CMD ["/edx/app/supervisor/venvs/supervisor/bin/supervisord", "-n", "--configuration", "/edx/app/supervisor/supervisord.conf"]
......@@ -18,9 +19,12 @@ WORKDIR /edx/app/edx_ansible/edx_ansible/docker/plays
COPY docker/build/edxapp/ansible_overrides.yml /
ARG OPENEDX_RELEASE=master
ENV OPENEDX_RELEASE=${OPENEDX_RELEASE}
RUN sudo /edx/app/edx_ansible/venvs/edx_ansible/bin/ansible-playbook edxapp.yml \
-c local -i '127.0.0.1,' \
-t 'install,assets,devstack' \
--extra-vars=edx_platform_version=${OPENEDX_RELEASE} \
--extra-vars="@/ansible_overrides.yml"
EXPOSE 18000 18010
......@@ -8,7 +8,6 @@ EDXAPP_MONGO_HOSTS:
devstack: true
migrate_db: false
mongo_enable_journal: false
edx_platform_version: 'master'
edxapp_npm_production: "no"
EDXAPP_LMS_GUNICORN_EXTRA_CONF: 'reload = True'
......
......@@ -10,7 +10,8 @@ ENV LANG C.UTF-8
ENV ANSIBLE_REPO="https://github.com/edx/ansible"
ENV CONFIGURATION_REPO="https://github.com/edx/configuration.git"
ENV CONFIGURATION_VERSION="master"
ARG OPENEDX_RELEASE=master
ENV CONFIGURATION_VERSION="${OPENEDX_RELEASE}"
ADD util/install/ansible-bootstrap.sh /tmp/ansible-bootstrap.sh
RUN chmod +x /tmp/ansible-bootstrap.sh
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment