Skip to content
This repository was archived by the owner on Sep 12, 2018. It is now read-only.

Commit f105885

Browse files
committed
Merge pull request #353 from dotcloud/plugins
Pluggable architecture
2 parents 6aece7b + ac0c8ff commit f105885

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

103 files changed

+2641
-1793
lines changed

.editorconfig

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# http://editorconfig.org
2+
root = true
3+
4+
[*]
5+
indent_style = space
6+
indent_size = 4
7+
end_of_line = lf
8+
charset = utf-8
9+
trim_trailing_whitespace = true
10+
insert_final_newline = true
11+
12+
[*.md]
13+
trim_trailing_whitespace = false
14+
15+
[test/**/*.txt]
16+
insert_final_newline = false
17+
trim_trailing_whitespace = false

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,9 @@ eggs
2323

2424
Vagrantfile
2525
.vagrant
26+
27+
docker-registry-core.sublime-workspace
28+
29+
*tmp
30+
31+
*.sublime-project

.travis.yml

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,26 @@
11
language: python
2+
23
python:
4+
- "2.6"
35
- "2.7"
6+
47
install:
5-
- pip install tox
8+
## This below should be separated when core lives elsewhere
9+
# Install core tests reqs
10+
- pip install -rdepends/docker-registry-core/tests/requirements-tests.txt
11+
- pip install -rdepends/docker-registry-core/tests/requirements-style.txt
12+
# Install core itself
13+
- pip install depends/docker-registry-core/
14+
15+
# Install our tests requirements, and ourselves
16+
- pip install -rtests/requirements.txt
617
- pip install .
7-
script: tox
18+
19+
# XXX should run the core tests as well
20+
script: SETTINGS_FLAVOR=test DOCKER_REGISTRY_CONFIG=config_sample.yml flake8 . && SETTINGS_FLAVOR=test DOCKER_REGISTRY_CONFIG=config_sample.yml python setup.py nosetests
21+
822
before_install:
923
- sudo apt-get update
10-
- sudo apt-get install build-essential python-dev libevent-dev python-pip liblzma-dev
24+
- sudo apt-get install libevent-dev liblzma-dev
25+
26+
# build-essential python-dev

Dockerfile

Lines changed: 21 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -5,26 +5,31 @@
55
# TO_BUILD: docker build -rm -t registry .
66
# TO_RUN: docker run -p 5000:5000 registry
77

8-
FROM ubuntu:13.10
8+
# Latest Ubuntu LTS
9+
from ubuntu:14.04
910

10-
RUN apt-get update; \
11-
apt-get install -y git-core build-essential python-dev \
12-
libevent1-dev python-openssl liblzma-dev wget; \
13-
rm /var/lib/apt/lists/*_*
14-
RUN cd /tmp; wget https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py
15-
RUN cd /tmp; python ez_setup.py; easy_install pip; \
16-
rm ez_setup.py
11+
# Update
12+
run apt-get update
13+
run apt-get -y upgrade
1714

18-
ADD . /docker-registry
19-
ADD ./config/boto.cfg /etc/boto.cfg
15+
# Install pip
16+
run apt-get -y install python-pip
2017

21-
RUN pip install /docker-registry/
18+
# Install deps for backports.lzma (python2 requires it)
19+
run apt-get -y install python-dev liblzma-dev libevent1-dev
2220

23-
ENV DOCKER_REGISTRY_CONFIG /docker-registry/config/config_sample.yml
24-
ENV SETTINGS_FLAVOR dev
21+
add . /docker-registry
22+
add ./config/boto.cfg /etc/boto.cfg
2523

26-
EXPOSE 5000
24+
# Install core
25+
run pip install /docker-registry/depends/docker-registry-core
2726

28-
WORKDIR /docker-registry
27+
# Install registry
28+
run pip install /docker-registry/
2929

30-
CMD exec docker-registry
30+
env DOCKER_REGISTRY_CONFIG /docker-registry/config/config_sample.yml
31+
env SETTINGS_FLAVOR dev
32+
33+
expose 5000
34+
35+
cmd exec docker-registry

MANIFEST.in

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
include requirements.txt
2+
include tests/requirements.txt
3+
include README.md
4+
include LICENSE

_postinstall

Lines changed: 0 additions & 8 deletions
This file was deleted.

build.sh

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,11 @@ cd $SERVICE_APPROOT
66
virtualenv --python=python2.7 ~/env || exit 1
77
. ~/env/bin/activate
88

9-
[ -f requirements.txt ] &&
10-
pip install --download-cache=~/.pip-cache . || exit 1
9+
pip install --download-cache=~/.pip-cache ./depends/docker-registry-core || exit 1
10+
pip install --download-cache=~/.pip-cache . || exit 1
1111

1212
cp -R * ~/
1313

1414
cat > ~/profile << ENDPROFILE
1515
. ~/env/bin/activate
16-
export PYTHONPATH=~/
1716
ENDPROFILE
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# http://editorconfig.org
2+
root = true
3+
4+
[*]
5+
indent_style = space
6+
indent_size = 4
7+
end_of_line = lf
8+
charset = utf-8
9+
trim_trailing_whitespace = true
10+
insert_final_newline = true
11+
12+
[*.md]
13+
trim_trailing_whitespace = false
14+
15+
[test/**/*.txt]
16+
insert_final_newline = false
17+
trim_trailing_whitespace = false
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
.coverage
2+
.tox
3+
4+
# Packages
5+
*.egg
6+
*.egg-info
7+
dist
8+
build
9+
eggs
10+
11+
12+
*.DS_Store
13+
14+
*.pyc
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
language: python
2+
python:
3+
- "2.6"
4+
- "2.7"
5+
- "3.2"
6+
- "3.3"
7+
- "3.4"
8+
9+
install:
10+
- pip install -rtests/requirements-test.txt
11+
- pip install -rtests/requirements-style.txt
12+
- pip install .
13+
14+
script: flake8 . && python setup.py nosetests
15+
16+
# before_install:
17+
# - sudo apt-get update
18+
# - sudo apt-get install build-essential python-dev libevent-dev python-pip liblzma-dev
19+

0 commit comments

Comments
 (0)