kopia lustrzana https://github.com/jupyterhub/repo2docker
Fix dockerfile builds and add tests for them
rodzic
7d52aca469
commit
208d097468
|
@ -18,3 +18,4 @@ env:
|
||||||
- REPO_TYPE=conda
|
- REPO_TYPE=conda
|
||||||
- REPO_TYPE=venv
|
- REPO_TYPE=venv
|
||||||
- REPO_TYPE=julia
|
- REPO_TYPE=julia
|
||||||
|
- REPO_TYPE=dockerfile
|
||||||
|
|
|
@ -677,6 +677,15 @@ class DockerBuildPack(BuildPack):
|
||||||
with open('Dockerfile') as f:
|
with open('Dockerfile') as f:
|
||||||
return f.read()
|
return f.read()
|
||||||
|
|
||||||
|
def build(self, image_spec):
|
||||||
|
client = docker.APIClient(version='auto', **docker.utils.kwargs_from_env())
|
||||||
|
for line in client.build(
|
||||||
|
path=os.getcwd(),
|
||||||
|
tag=image_spec,
|
||||||
|
decode=True
|
||||||
|
):
|
||||||
|
yield line
|
||||||
|
|
||||||
class LegacyBinderDockerBuildPack(BuildPack):
|
class LegacyBinderDockerBuildPack(BuildPack):
|
||||||
|
|
||||||
name = 'Legacy Binder Dockerfile'
|
name = 'Legacy Binder Dockerfile'
|
||||||
|
|
|
@ -0,0 +1,4 @@
|
||||||
|
FROM jupyter/base-notebook:b4dd11e16ae4
|
||||||
|
|
||||||
|
RUN pip install there
|
||||||
|
ADD verify verify
|
|
@ -0,0 +1,7 @@
|
||||||
|
#!/usr/bin/env python
|
||||||
|
import sys
|
||||||
|
|
||||||
|
assert sys.version_info[:2] == (3, 6)
|
||||||
|
|
||||||
|
import jupyter
|
||||||
|
import there
|
|
@ -0,0 +1,6 @@
|
||||||
|
FROM alpine:3.5
|
||||||
|
|
||||||
|
ENTRYPOINT "/bin/sh"
|
||||||
|
|
||||||
|
ADD sayhi.sh /usr/local/bin/sayhi.sh
|
||||||
|
ADD verify verify
|
|
@ -0,0 +1,3 @@
|
||||||
|
#!/bin/bash
|
||||||
|
echo hi
|
||||||
|
exit 0
|
|
@ -0,0 +1,3 @@
|
||||||
|
#!/bin/sh
|
||||||
|
set -e
|
||||||
|
/usr/local/bin/sayhi.sh
|
Ładowanie…
Reference in New Issue