Add Docker Compose basic environment
This commit is contained in:
parent
9b11769a70
commit
3d693f0632
|
@ -0,0 +1,40 @@
|
|||
FROM alpine:3.7 AS downloader
|
||||
|
||||
ARG HTTP_PROXY=""
|
||||
ARG HTTPS_PROXY=""
|
||||
ARG http_proxy=""
|
||||
ARG https_proxy=""
|
||||
ARG OPENWRT_VERSION=18.06.1
|
||||
|
||||
RUN apk add --no-cache wget tar
|
||||
RUN wget -O openwrt.tar.gz https://downloads.openwrt.org/releases/${OPENWRT_VERSION}/targets/x86/generic/openwrt-${OPENWRT_VERSION}-x86-generic-generic-rootfs.tar.gz\
|
||||
&& mkdir /openwrt \
|
||||
&& tar -C /openwrt -xzf openwrt.tar.gz
|
||||
|
||||
FROM scratch
|
||||
|
||||
COPY --from=downloader /openwrt /
|
||||
|
||||
RUN mkdir -p /var/lock \
|
||||
&& mkdir -p /var/run
|
||||
|
||||
USER root
|
||||
|
||||
# Install and enable Luci
|
||||
RUN opkg update\
|
||||
&& opkg install luci luci-mod-rpc\
|
||||
&& /etc/init.d/uhttpd enable
|
||||
|
||||
RUN rm /lib/preinit/* &&\
|
||||
echo > /lib/preinit/00_empty_dummy_script &&\
|
||||
/etc/init.d/cron disable &&\
|
||||
/etc/init.d/gpio_switch disable &&\
|
||||
/etc/init.d/led disable &&\
|
||||
/etc/init.d/dropbear disable &&\
|
||||
/etc/init.d/network disable &&\
|
||||
/etc/init.d/odhcpd disable &&\
|
||||
/etc/init.d/sysctl disable &&\
|
||||
/etc/init.d/sysfixtime disable &&\
|
||||
/etc/init.d/sysntpd disable
|
||||
|
||||
CMD /sbin/init
|
|
@ -1,3 +1,4 @@
|
|||
# Documentation
|
||||
|
||||
- [Préparer son environnement de développement](./prepa-dev.md)
|
||||
- [Préparer son environnement de développement](./prepa-dev.md)
|
||||
- [Utilisation de l'environnement Compose](./compose.md)
|
|
@ -0,0 +1,22 @@
|
|||
# Utilisation de l'environnement Compose
|
||||
|
||||
Un environnement docker-compose est mis à disposition des développeurs afin de faciliter le processus de développement.
|
||||
|
||||
Cet environnement contient:
|
||||
|
||||
- Une installation d'OpenWRT basique
|
||||
|
||||
|
||||
## Lancer l'environnement
|
||||
|
||||
Il vous faudra [Docker](https://docs.docker.com/install/) et [Compose](https://docs.docker.com/compose/overview/) sur votre machine.
|
||||
|
||||
Dans le répertoire du projet Orion, faites
|
||||
|
||||
```
|
||||
docker-compose up
|
||||
```
|
||||
|
||||
Les services suivants seront alors exposés sur votre machine:
|
||||
|
||||
- http://localhost:8080/ - Accès à l'interface LuCi du service OpenWRT
|
|
@ -0,0 +1,12 @@
|
|||
version: '2.2'
|
||||
services:
|
||||
openwrt:
|
||||
build:
|
||||
context: ./containers/openwrt
|
||||
args:
|
||||
HTTP_PROXY: ${HTTP_PROXY}
|
||||
HTTPS_PROXY: ${HTTPS_PROXY}
|
||||
http_proxy: ${http_proxy}
|
||||
https_proxy: ${https_proxy}
|
||||
ports:
|
||||
- 8080:80
|
Reference in New Issue