Add ubuntu
This commit is contained in:
parent
02379d1e9a
commit
c4bbe0f28f
|
@ -0,0 +1,23 @@
|
|||
FROM ubuntu:xenial
|
||||
|
||||
ENV VIRTUAL_ENV /virtualenv
|
||||
ENV PATH "$VIRTUAL_ENV/bin:$PATH"
|
||||
COPY downloader.sh /
|
||||
RUN set -x \
|
||||
&& apt-get update \
|
||||
&& apt-get install -y --no-install-recommends \
|
||||
ca-certificates \
|
||||
curl \
|
||||
python \
|
||||
&& curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py \
|
||||
&& python get-pip.py \
|
||||
&& rm get-pip.py \
|
||||
&& pip install virtualenv \
|
||||
&& /downloader.sh \
|
||||
&& virtualenv $VIRTUAL_ENV \
|
||||
&& hash -r \
|
||||
&& pip install -c /tmp/packages/upper-constraints.txt --no-compile --find-links /tmp/packages http://tarballs.openstack.org/glance/glance-master.tar.gz \
|
||||
&& apt-get purge -y --auto-remove \
|
||||
ca-certificates \
|
||||
curl \
|
||||
&& rm -rf /var/lib/apt/lists/* /tmp/* /root/.cache /usr/local/*
|
|
@ -0,0 +1,12 @@
|
|||
#!/bin/bash -eux
|
||||
|
||||
DISTRO="ubuntu"
|
||||
REPO="yaodu/requirements"
|
||||
TAG="latest-${DISTRO}"
|
||||
TOKEN=$(curl "https://auth.docker.io/token?service=registry.docker.io&scope=repository:${REPO}:pull" | python -c "import sys, json; print json.load(sys.stdin)['token']")
|
||||
BLOB=$(curl -H "Authorization: Bearer ${TOKEN}" https://registry.hub.docker.com/v2/${REPO}/manifests/${TAG} | python -c "import sys, json; print json.load(sys.stdin)['fsLayers'][0]['blobSum']")
|
||||
|
||||
curl -L -H "Authorization: Bearer ${TOKEN}" https://registry.hub.docker.com/v2/${REPO}/blobs/${BLOB} > /tmp/wheels.tar.gz
|
||||
|
||||
mkdir /tmp/packages
|
||||
tar xvf /tmp/wheels.tar.gz -C /tmp/packages/ --strip-components=2 root/packages
|
Loading…
Reference in New Issue