From 53ac51dc93f1a4ad18b24d7bbbf26b8e2513a202 Mon Sep 17 00:00:00 2001 From: Thorsten von Eicken Date: Fri, 23 Sep 2016 21:24:39 -0700 Subject: [PATCH] add Dockerfile --- Dockerfile | 30 ++++++++++++++++++++++++++++++ Makefile | 2 ++ 2 files changed, 32 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..7d0ca11 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,30 @@ +# Dockerfile for github.com/jeelabs/esp-link +# +# This dockerfile is intended to be used to compile esp-link as it's checked out on +# your desktop/laptop. You can git clone esp-link, and then compile it using +# a commandline of `docker run -v $PWD:/esp-link jeelabs/esp-link`. The -v mounts +# your esp-link source directory onto /esp-link in the container and the default command is +# to run make. +# If you would like to create your own container image, use `docker build -t esp-link .` +FROM ubuntu:16.04 + +RUN apt-get update \ + && apt-get install -y software-properties-common build-essential python curl git + +RUN curl -Ls http://s3.voneicken.com/xtensa-lx106-elf-20160330.tgx | tar Jxf - +RUN curl -Ls http://s3.voneicken.com/esp_iot_sdk_v2.0.0.p1.tgx | tar -Jxf - + +ENV XTENSA_TOOLS_ROOT /xtensa-lx106-elf/bin/ + +# This could be used to create an image with esp-link in it from github: +#RUN git clone https://github.com/jeelabs/esp-link + +# This could be used to create an image with esp-link in it from the local dir: +#COPY . esp-link/ + +# Expect the esp-link source/home dir to be mounted here: +VOLUME /esp-link +WORKDIR /esp-link + +# Default command is to run a build, can be overridden on the docker commandline: +CMD make diff --git a/Makefile b/Makefile index d6d3265..b59319b 100644 --- a/Makefile +++ b/Makefile @@ -489,6 +489,8 @@ release: all $(Q) echo "Release file: esp-link-$(BRANCH)-$(SHA).tgz" $(Q) rm -rf release +docker: + $(Q) docker build -t jeelabs/esp-link . clean: $(Q) rm -f $(APP_AR) $(Q) rm -f $(TARGET_OUT)