EasyPi / docker-openwrt

📡 OpenWrt Package Builder for Raspberry Pi
GNU General Public License v3.0
49 stars 10 forks source link

How to create a image for mt7620 #1

Closed yjdwbj closed 7 years ago

yjdwbj commented 8 years ago

Hi, may I ack you a question ,how to create image for mt7620,thanks a lot.

vimagick commented 8 years ago

Please take a look at Dockerfile.mt7628. You need to change the OPENWRT_XXX environment variables.

yjdwbj commented 8 years ago

Hi, here is my configuration list,please help me.thanks a lot

# docker-compose up -d
Pulling mt7620 (easypi/openwrt:mt7620)...
Pulling repository docker.io/easypi/openwrt
ERROR: Tag mt7620 not found in repository docker.io/easypi/openwrt
# cat docker-compose.yml
.........
mt7628:
  extends:
    service: base
  image: easypi/openwrt:mt7628
  volumes:
    - ./data/mt7628:/data

mt7620:
  extends:
    service: base
  image: easypi/openwrt:mt7620
  volumes:
    - ./data/mt7620:/data
.....
$ cat Dockerfile.mt7620
#
# Dockerfile for openwrt:mt7688
#

FROM easypi/openwrt:base
MAINTAINER EasyPi Software Foundation

ENV OPENWRT_VERSION=15.05.1
ENV OPENWRT_URL=https://downloads.openwrt.org/chaos_calmer/15.05.1/ramips/mt7620
ENV OPENWRT_IMG=OpenWrt-ImageBuilder-15.05.1-ramips-mt7620.Linux-x86_64
ENV OPENWRT_SDK=OpenWrt-SDK-15.05.1-ramips-mt7620_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64
ENV OPENWRT_IMG_URL=${OPENWRT_URL}/${OPENWRT_IMG}.tar.bz2
ENV OPENWRT_SDK_URL=${OPENWRT_URL}/${OPENWRT_SDK}.tar.bz2

RUN set -xe \
    && curl -sSL ${OPENWRT_IMG_URL} | tar xj \
    && curl -sSL ${OPENWRT_SDK_URL} | tar xj \
    && ln -s ${OPENWRT_IMG} img \
    && ln -s ${OPENWRT_SDK} sdk \
    && cd sdk \
    && ln -s /data bin \
    && ./scripts/feeds update -a
vimagick commented 8 years ago

Build docker image with tag easypi/openwrt:mt7620:

docker build -t easypi/openwrt:mt7620 -f Dockerfile.mt7620 .

Create docker-compose.yml file:

base:
  image: easypi/openwrt:base
  command: sleep infinity
  environment:
    - TERM=xterm
  restart: unless-stopped

mt7620:
  extends:
    service: base
  image: easypi/openwrt:mt7620
  volumes:
    - ./data/mt7620:/data

Start the container:

docker-compose up -d mt7620

Enter the container:

docker-compose exec mt7620 bash