Skip to content

Commit f25e50d

Browse files
committed
Add 'alpine-3.7' image
1 parent b7c5ee1 commit f25e50d

File tree

3 files changed

+60
-8
lines changed

3 files changed

+60
-8
lines changed

README.md

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,18 @@
22

33
[![Docker Hub](https://img.shields.io/badge/docker-ansible--jupyter-blue.svg)](https://hub.docker.com/r/chusiang/ansible-jupyter/) [![microbadger](https://images.microbadger.com/badges/image/chusiang/ansible-jupyter.svg)](https://microbadger.com/images/chusiang/ansible-jupyter "Get your own image badge on microbadger.com")
44

5-
A Docker image for run [Ansible][ansible_official] 2.4.2 on [Jupyter Notebook][jupyter_official] 4.4.0 (ipython notebook) with Browsers.
5+
A Docker image for run [Ansible][ansible_official] 2.5 on [Jupyter Notebook][jupyter_official] 4.4.0 (ipython notebook) with Browsers.
66

7-
[ansible_official]: https://www.ansible.com/
7+
[ansible_official]: https://www.ansible.com/
88
[jupyter_official]: http://jupyter.org/
99

1010
## Supported tags and respective `Dockerfile` links
1111

1212
- `alpine-3.4` [*(alpine-3.4/Dockerfile)*][dockerfile_alpine-3.4]
1313
- ~~`alpine-3.4_ansible-2.1`~~ [*(alpine-3.4_ansible-2.1/Dockerfile)*][dockerfile_alpine-3.4_ansible-2.1]
14-
- `alpine-3.6`, `latest` [*(alpine-3.6/Dockerfile)*][dockerfile_alpine-3.6]
14+
- `alpine-3.6` [*(alpine-3.6/Dockerfile)*][dockerfile_alpine-3.6]
1515
- `alpine-3.6_ansible-2.3` [*(alpine-3.6_ansible-2.3/Dockerfile)*][dockerfile_alpine-3.6_ansible-2.3]
16+
- `alpine-3.7`, `latest` [*(alpine-3.7/Dockerfile)*][dockerfile_alpine-3.7]
1617
- `archlinux` [*(archlinux/Dockerfile)*][dockerfile_archlinux]
1718
- ~~`centos-6`~~ [*(centos-6/Dockerfile)*][dockerfile_centos-6]
1819
- `centos-7` [*(centos-7/Dockerfile)*][dockerfile_centos-7]
@@ -30,6 +31,7 @@ A Docker image for run [Ansible][ansible_official] 2.4.2 on [Jupyter Notebook][j
3031
[dockerfile_alpine-3.4_ansible-2.1]: https://github.com/chusiang/ansible-jupyter.dockerfile/blob/master/alpine-3.4_ansible-2.1/Dockerfile
3132
[dockerfile_alpine-3.6]: https://github.com/chusiang/ansible-jupyter.dockerfile/blob/master/alpine-3.6/Dockerfile
3233
[dockerfile_alpine-3.6_ansible-2.3]: https://github.com/chusiang/ansible-jupyter.dockerfile/blob/master/alpine-3.6_ansible-2.3/Dockerfile
34+
[dockerfile_alpine-3.7]: https://github.com/chusiang/ansible-jupyter.dockerfile/blob/master/alpine-3.7/Dockerfile
3335
[dockerfile_archlinux]: https://github.com/chusiang/ansible-jupyter.dockerfile/blob/master/archlinux/Dockerfile
3436
[dockerfile_centos-6]: https://github.com/chusiang/ansible-jupyter.dockerfile/blob/master/centos-6/Dockerfile
3537
[dockerfile_centos-7]: https://github.com/chusiang/ansible-jupyter.dockerfile/blob/master/centos-7/Dockerfile
@@ -66,13 +68,13 @@ A Docker image for run [Ansible][ansible_official] 2.4.2 on [Jupyter Notebook][j
6668
## Run container
6769
6870
1. Get image.
69-
71+
7072
```
7173
$ docker pull chusiang/ansible-jupyter
7274
```
7375
7476
1. Run the container with daemon mode.
75-
77+
7678
```
7779
$ docker run --name ansible-jupyter -P -d chusiang/ansible-jupyter
7880
be8a15b9d4da5d24610c1fc738cb13086f01101e90f94640360d8d84892de772
@@ -92,7 +94,7 @@ A Docker image for run [Ansible][ansible_official] 2.4.2 on [Jupyter Notebook][j
9294
$ docker exec -it ansible-jupyter sh
9395
/ #
9496
```
95-
97+
9698
## Play Ansible on Jupyter
9799
98100
Now, you can play the Ansible on Jupyter.
@@ -102,11 +104,11 @@ Now, you can play the Ansible on Jupyter.
102104
```
103105
# GNU/Linux
104106
$ firefox http://localhost:32786
105-
107+
106108
# macOS
107109
$ open http://localhost:32786
108110
```
109-
111+
110112
![2016-11-20-ansible-jupyter1]
111113
112114
1. Attach my example ==> [`ansible_on_jupyter.ipynb`][ansible_on_jupyter.ipynb].
@@ -127,6 +129,7 @@ Enjoy it !
127129
128130
### 2018
129131
132+
* 06/18 Add images of `alpine-3.7`.
130133
* 01/10 Stop automated build images of `centos-6`, `debian-7` and `alpine-3.4_ansible-2.1`.
131134
132135
### 2017

alpine-3.7/Dockerfile

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
FROM alpine:3.7
2+
3+
MAINTAINER Chu-Siang Lai <chusiang@drx.tw>
4+
5+
# Update the index of available packages.
6+
RUN apk update
7+
8+
# Install the requires apk package and python.
9+
RUN apk add --no-cache linux-headers gcc build-base python py-pip python-dev \
10+
libffi-dev openssl-dev ca-certificates
11+
12+
# Upgrade the pip to lastest.
13+
RUN pip install -U pip
14+
15+
# Setup the ansible.
16+
RUN pip install ansible
17+
18+
# for disable localhost warning message.
19+
RUN mkdir /etc/ansible && \
20+
/bin/echo -e "[local]\nlocalhost ansible_connection=local" > /etc/ansible/hosts
21+
22+
# Setup with Ansible.
23+
ADD https://raw.githubusercontent.com/chusiang/ansible-jupyter.dockerfile/master/setup_jupyter.yml /home
24+
RUN ansible-playbook -vv /home/setup_jupyter.yml
25+
26+
# Copy a ipython notebook example to image.
27+
ADD https://raw.githubusercontent.com/chusiang/ansible-jupyter.dockerfile/master/ipynb/ansible_on_jupyter.ipynb /home/
28+
29+
# Run service of Jupyter.
30+
COPY docker-entrypoint.sh /usr/local/bin/
31+
ENTRYPOINT [ "docker-entrypoint.sh" ]
32+
EXPOSE 8888
33+
34+
CMD [ "jupyter", "--version" ]

alpine-3.7/docker-entrypoint.sh

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/bin/sh
2+
# ============================================================
3+
# Author: Chu-Siang Lai / chusiang (at) drx.tw
4+
# Blog: http://note.drx.tw
5+
# Filename: docker-entrypoint.sh
6+
# Modified: 2016-11-20 18:43
7+
# Description: Run the jupyter service.
8+
#
9+
# --ip 0.0.0.0: Allow all IP access.
10+
# --no-browser: Don't open browser from command line.
11+
# --notebook-dir: Bunding the workdir.
12+
#
13+
# ===========================================================
14+
15+
jupyter-notebook --ip 0.0.0.0 --no-browser --allow-root --notebook-dir=/home

0 commit comments

Comments
 (0)