From 8567a6a222a77ae022d0dc6f3200f12fbeb68e93 Mon Sep 17 00:00:00 2001 From: Petros Angelatos Date: Wed, 6 Jul 2016 00:36:23 -0700 Subject: [PATCH 01/13] build: remove dockerfiles for debian and alpine The old build system will be replaced Signed-off-by: Petros Angelatos --- 01_nodoc | 9 --- Dockerfile.alpine.amd64 | 51 ----------------- Dockerfile.alpine.armv7hf | 51 ----------------- Dockerfile.alpine.i386 | 51 ----------------- Dockerfile.alpine.rpi | 51 ----------------- Dockerfile.amd64 | 57 ------------------- Dockerfile.armel | 57 ------------------- Dockerfile.armv7hf | 57 ------------------- Dockerfile.i386 | 57 ------------------- Dockerfile.rpi | 53 ----------------- config/supervisor/conf.d/go-supervisor.conf | 10 ---- .../supervisor/conf.d/resin-supervisor.conf | 10 ---- config/supervisor/supervisord.conf | 28 --------- entry.alpine.sh | 43 -------------- postinstall.sh | 19 ------- 15 files changed, 604 deletions(-) delete mode 100644 01_nodoc delete mode 100644 Dockerfile.alpine.amd64 delete mode 100644 Dockerfile.alpine.armv7hf delete mode 100644 Dockerfile.alpine.i386 delete mode 100644 Dockerfile.alpine.rpi delete mode 100644 Dockerfile.amd64 delete mode 100644 Dockerfile.armel delete mode 100644 Dockerfile.armv7hf delete mode 100644 Dockerfile.i386 delete mode 100644 Dockerfile.rpi delete mode 100644 config/supervisor/conf.d/go-supervisor.conf delete mode 100644 config/supervisor/conf.d/resin-supervisor.conf delete mode 100644 config/supervisor/supervisord.conf delete mode 100755 entry.alpine.sh delete mode 100755 postinstall.sh diff --git a/01_nodoc b/01_nodoc deleted file mode 100644 index da9b09e7..00000000 --- a/01_nodoc +++ /dev/null @@ -1,9 +0,0 @@ -path-exclude /usr/share/doc/* -path-exclude /usr/share/man/* -path-exclude /usr/share/groff/* -path-exclude /usr/share/info/* -path-exclude /usr/share/lintian/* -path-exclude /usr/share/linda/* - -path-exclude /usr/share/locale/* -path-include /usr/share/locale/en* diff --git a/Dockerfile.alpine.amd64 b/Dockerfile.alpine.amd64 deleted file mode 100644 index e169eae4..00000000 --- a/Dockerfile.alpine.amd64 +++ /dev/null @@ -1,51 +0,0 @@ -FROM resin/amd64-alpine-node:0.10.44-slim - -ENV DOCKER_COMPOSE_VERSION 1.7.1 -ENV DOCKER_COMPOSE_SHA256 0b8184817097eb670b92cbdac6cb9f7f2e9fe384c0b1060cb9b3d1a475fcbea6 - -# Supervisor apt dependencies -RUN apk add --update \ - btrfs-progs \ - ca-certificates \ - curl \ - rsync \ - supervisor \ - && curl -sLO http://resin-packages.s3.amazonaws.com/docker-compose/${DOCKER_COMPOSE_VERSION}/docker-compose-linux-alpine-amd64-${DOCKER_COMPOSE_VERSION}.tar.gz \ - && echo "$DOCKER_COMPOSE_SHA256 docker-compose-linux-alpine-amd64-${DOCKER_COMPOSE_VERSION}.tar.gz" > docker-compose-linux-alpine-amd64-${DOCKER_COMPOSE_VERSION}.tar.gz.sha256 \ - && sha256sum -c docker-compose-linux-alpine-amd64-${DOCKER_COMPOSE_VERSION}.tar.gz.sha256 \ - && tar xzf docker-compose-linux-alpine-amd64-${DOCKER_COMPOSE_VERSION}.tar.gz \ - && mv docker-compose-linux-alpine-amd64-${DOCKER_COMPOSE_VERSION}/docker-compose-linux-alpine-amd64 /usr/bin/docker-compose \ - && rm -rf docker-compose-linux-alpine-amd64-${DOCKER_COMPOSE_VERSION}* \ - && apk del curl \ - && rm -rf /var/cache/apk/* - -# Copy supervisord configuration files -COPY config/supervisor/ /etc/supervisor/ - -# Install dependencies -WORKDIR /app -COPY package.json postinstall.sh /app/ -RUN set -x \ - && buildDeps='g++ sqlite-dev sqlite-libs make' \ - && apk add --update $buildDeps \ - && JOBS=MAX npm install --unsafe-perm --production --no-optional --build-from-source \ - && npm dedupe \ - && npm cache clean \ - && rm -rf /tmp/* \ - && apk del $buildDeps \ - && rm -rf /var/cache/apk/* - -# Copy source -COPY . /app/ - -RUN /app/node_modules/.bin/coffee -c /app/src \ - && ln -sf /app/entry.alpine.sh /start # Needed for legacy - -RUN chmod +x /app/bin/gosuper - -ENV SUPERVISOR_IMAGE resin/amd64-supervisor -ENV SUPERVISOR_TAG_EXTRA alpine -ENV CONFIG_MOUNT_POINT /boot/config.json -ENV LED_FILE /dev/null - -ENTRYPOINT ["/app/entry.alpine.sh"] diff --git a/Dockerfile.alpine.armv7hf b/Dockerfile.alpine.armv7hf deleted file mode 100644 index daf60c23..00000000 --- a/Dockerfile.alpine.armv7hf +++ /dev/null @@ -1,51 +0,0 @@ -FROM resin/armhf-alpine-node:0.10.44-slim - -ENV DOCKER_COMPOSE_VERSION 1.7.1 -ENV DOCKER_COMPOSE_SHA256 3e5d0a36f06d9f7a93eb20c1dee67da623b07a322168538ea80d65c8581f5567 - -# Supervisor apt dependencies -RUN apk add --update \ - btrfs-progs \ - ca-certificates \ - curl \ - rsync \ - supervisor \ - && curl -sLO http://resin-packages.s3.amazonaws.com/docker-compose/${DOCKER_COMPOSE_VERSION}/docker-compose-linux-alpine-armhf-${DOCKER_COMPOSE_VERSION}.tar.gz \ - && echo "$DOCKER_COMPOSE_SHA256 docker-compose-linux-alpine-armhf-${DOCKER_COMPOSE_VERSION}.tar.gz" > docker-compose-linux-alpine-armhf-${DOCKER_COMPOSE_VERSION}.tar.gz.sha256 \ - && sha256sum -c docker-compose-linux-alpine-armhf-${DOCKER_COMPOSE_VERSION}.tar.gz.sha256 \ - && tar xzf docker-compose-linux-alpine-armhf-${DOCKER_COMPOSE_VERSION}.tar.gz \ - && mv docker-compose-linux-alpine-armhf-${DOCKER_COMPOSE_VERSION}/docker-compose-linux-alpine-armhf /usr/bin/docker-compose \ - && rm -rf docker-compose-linux-alpine-armhf-${DOCKER_COMPOSE_VERSION}* \ - && apk del curl \ - && rm -rf /var/cache/apk/* - -# Copy supervisord configuration files -COPY config/supervisor/ /etc/supervisor/ - -# Install dependencies -WORKDIR /app -COPY package.json postinstall.sh /app/ -RUN set -x \ - && buildDeps='g++ sqlite-dev sqlite-libs make' \ - && apk add --update $buildDeps \ - && JOBS=MAX npm install --unsafe-perm --production --no-optional --build-from-source \ - && npm dedupe \ - && npm cache clean \ - && rm -rf /tmp/* \ - && apk del $buildDeps \ - && rm -rf /var/cache/apk/* - -# Copy source -COPY . /app/ - -RUN /app/node_modules/.bin/coffee -c /app/src \ - && ln -sf /app/entry.alpine.sh /start # Needed for legacy - -RUN chmod +x /app/bin/gosuper - -ENV SUPERVISOR_IMAGE resin/armv7hf-supervisor -ENV SUPERVISOR_TAG_EXTRA alpine -ENV CONFIG_MOUNT_POINT /boot/config.json -ENV LED_FILE /dev/null - -ENTRYPOINT ["/app/entry.alpine.sh"] diff --git a/Dockerfile.alpine.i386 b/Dockerfile.alpine.i386 deleted file mode 100644 index 14bc0140..00000000 --- a/Dockerfile.alpine.i386 +++ /dev/null @@ -1,51 +0,0 @@ -FROM resin/i386-alpine-node:0.10.44-slim - -ENV DOCKER_COMPOSE_VERSION 1.7.1 -ENV DOCKER_COMPOSE_SHA256 160ba547bfd4dc967ec4f1927550f2d832316fad492e0e6f8d374da89ddac779 - -# Supervisor apt dependencies -RUN apk add --update \ - btrfs-progs \ - ca-certificates \ - curl \ - rsync \ - supervisor \ - && curl -sLO http://resin-packages.s3.amazonaws.com/docker-compose/${DOCKER_COMPOSE_VERSION}/docker-compose-linux-alpine-i386-${DOCKER_COMPOSE_VERSION}.tar.gz \ - && echo "$DOCKER_COMPOSE_SHA256 docker-compose-linux-alpine-i386-${DOCKER_COMPOSE_VERSION}.tar.gz" > docker-compose-linux-alpine-i386-${DOCKER_COMPOSE_VERSION}.tar.gz.sha256 \ - && sha256sum -c docker-compose-linux-alpine-i386-${DOCKER_COMPOSE_VERSION}.tar.gz.sha256 \ - && tar xzf docker-compose-linux-alpine-i386-${DOCKER_COMPOSE_VERSION}.tar.gz \ - && mv docker-compose-linux-alpine-i386-${DOCKER_COMPOSE_VERSION}/docker-compose-linux-alpine-i386 /usr/bin/docker-compose \ - && rm -rf docker-compose-linux-alpine-i386-${DOCKER_COMPOSE_VERSION}* \ - && apk del curl \ - && rm -rf /var/cache/apk/* - -# Copy supervisord configuration files -COPY config/supervisor/ /etc/supervisor/ - -# Install dependencies -WORKDIR /app -COPY package.json postinstall.sh /app/ -RUN set -x \ - && buildDeps='g++ sqlite-dev sqlite-libs make' \ - && apk add --update $buildDeps \ - && JOBS=MAX npm install --unsafe-perm --production --no-optional --build-from-source \ - && npm dedupe \ - && npm cache clean \ - && rm -rf /tmp/* \ - && apk del $buildDeps \ - && rm -rf /var/cache/apk/* - -# Copy source -COPY . /app/ - -RUN /app/node_modules/.bin/coffee -c /app/src \ - && ln -sf /app/entry.alpine.sh /start # Needed for legacy - -RUN chmod +x /app/bin/gosuper - -ENV SUPERVISOR_IMAGE resin/i386-supervisor -ENV SUPERVISOR_TAG_EXTRA alpine -ENV CONFIG_MOUNT_POINT /boot/config.json -ENV LED_FILE /dev/null - -ENTRYPOINT ["/app/entry.alpine.sh"] diff --git a/Dockerfile.alpine.rpi b/Dockerfile.alpine.rpi deleted file mode 100644 index 3d666ec6..00000000 --- a/Dockerfile.alpine.rpi +++ /dev/null @@ -1,51 +0,0 @@ -FROM resin/armhf-alpine-node:0.10.44-slim - -ENV DOCKER_COMPOSE_VERSION 1.7.1 -ENV DOCKER_COMPOSE_SHA256 3e5d0a36f06d9f7a93eb20c1dee67da623b07a322168538ea80d65c8581f5567 - -# Supervisor apt dependencies -RUN apk add --update \ - btrfs-progs \ - ca-certificates \ - curl \ - rsync \ - supervisor \ - && curl -sLO http://resin-packages.s3.amazonaws.com/docker-compose/${DOCKER_COMPOSE_VERSION}/docker-compose-linux-alpine-armhf-${DOCKER_COMPOSE_VERSION}.tar.gz \ - && echo "$DOCKER_COMPOSE_SHA256 docker-compose-linux-alpine-armhf-${DOCKER_COMPOSE_VERSION}.tar.gz" > docker-compose-linux-alpine-armhf-${DOCKER_COMPOSE_VERSION}.tar.gz.sha256 \ - && sha256sum -c docker-compose-linux-alpine-armhf-${DOCKER_COMPOSE_VERSION}.tar.gz.sha256 \ - && tar xzf docker-compose-linux-alpine-armhf-${DOCKER_COMPOSE_VERSION}.tar.gz \ - && mv docker-compose-linux-alpine-armhf-${DOCKER_COMPOSE_VERSION}/docker-compose-linux-alpine-armhf /usr/bin/docker-compose \ - && rm -rf docker-compose-linux-alpine-armhf-${DOCKER_COMPOSE_VERSION}* \ - && apk del curl \ - && rm -rf /var/cache/apk/* - -# Copy supervisord configuration files -COPY config/supervisor/ /etc/supervisor/ - -# Install dependencies -WORKDIR /app -COPY package.json postinstall.sh /app/ -RUN set -x \ - && buildDeps='g++ sqlite-dev sqlite-libs make' \ - && apk add --update $buildDeps \ - && JOBS=MAX npm install --unsafe-perm --production --no-optional --build-from-source \ - && npm dedupe \ - && npm cache clean \ - && rm -rf /tmp/* \ - && apk del $buildDeps \ - && rm -rf /var/cache/apk/* - -# Copy source -COPY . /app/ - -RUN /app/node_modules/.bin/coffee -c /app/src \ - && ln -sf /app/entry.alpine.sh /start # Needed for legacy - -RUN chmod +x /app/bin/gosuper - -ENV SUPERVISOR_IMAGE resin/rpi-supervisor -ENV SUPERVISOR_TAG_EXTRA alpine -ENV CONFIG_MOUNT_POINT /boot/config.json -ENV LED_FILE /dev/null - -ENTRYPOINT ["/app/entry.alpine.sh"] diff --git a/Dockerfile.amd64 b/Dockerfile.amd64 deleted file mode 100644 index f226c9a8..00000000 --- a/Dockerfile.amd64 +++ /dev/null @@ -1,57 +0,0 @@ -FROM resin/amd64-node:0.10.40-slim - -COPY 01_nodoc /etc/dpkg/dpkg.cfg.d/ - -ENV DOCKER_COMPOSE_VERSION 1.7.1 -ENV DOCKER_COMPOSE_SHA256 37df85ee18bf0e2a8d71cbfb8198b1c06cc388f19118be7bdfc4d6db112af834 - -# Supervisor apt dependencies -RUN apt-get -q update \ - && apt-get install -qqy \ - btrfs-tools \ - ca-certificates \ - curl \ - iptables \ - rsync \ - supervisor \ - --no-install-recommends \ - && curl -sLO http://resin-packages.s3.amazonaws.com/docker-compose/${DOCKER_COMPOSE_VERSION}/docker-compose-linux-amd64-${DOCKER_COMPOSE_VERSION}.tar.gz \ - && echo $DOCKER_COMPOSE_SHA256 docker-compose-linux-amd64-${DOCKER_COMPOSE_VERSION}.tar.gz > docker-compose-linux-amd64-${DOCKER_COMPOSE_VERSION}.tar.gz.sha256 \ - && sha256sum -c docker-compose-linux-amd64-${DOCKER_COMPOSE_VERSION}.tar.gz.sha256 \ - && tar xzf docker-compose-linux-amd64-${DOCKER_COMPOSE_VERSION}.tar.gz \ - && mv docker-compose-linux-amd64-${DOCKER_COMPOSE_VERSION}/docker-compose-linux-amd64 /usr/bin/docker-compose \ - && rm -rf docker-compose-linux-amd64-${DOCKER_COMPOSE_VERSION}* \ - && apt-get purge -qqy curl \ - && apt-get clean \ - && rm -rf /var/lib/apt/lists/ - -# Copy supervisord configuration files -COPY config/supervisor/ /etc/supervisor/ - -# Install dependencies -WORKDIR /app -COPY package.json postinstall.sh /app/ -RUN apt-get -q update \ - && apt-get install -qqy g++ libsqlite3-dev make --no-install-recommends \ - && JOBS=MAX npm install --unsafe-perm --production --no-optional \ - && npm dedupe \ - && npm cache clean \ - && rm -rf /tmp/* \ - && apt-get purge -qqy g++ libsqlite3-dev make binutils \ - && apt-get clean \ - && apt-get autoremove -qqy \ - && rm -rf /var/lib/apt/lists/ - -# Copy source -COPY . /app/ - -RUN /app/node_modules/.bin/coffee -c /app/src \ - && ln -sf /app/entry.sh /start # Needed for legacy - -RUN chmod +x /app/bin/gosuper - -ENV SUPERVISOR_IMAGE resin/amd64-supervisor -ENV CONFIG_MOUNT_POINT /boot/config.json -ENV LED_FILE /dev/null - -ENTRYPOINT ["/app/entry.sh"] diff --git a/Dockerfile.armel b/Dockerfile.armel deleted file mode 100644 index a21506ce..00000000 --- a/Dockerfile.armel +++ /dev/null @@ -1,57 +0,0 @@ -FROM resin/armel-node:0.10.40-slim - -COPY 01_nodoc /etc/dpkg/dpkg.cfg.d/ - -ENV DOCKER_COMPOSE_VERSION 1.7.1 -ENV DOCKER_COMPOSE_SHA256 a1025fed97536e2698798ea277a014ec5e1eae816a8cf3155ecbe9679e3e7bac - -# Supervisor apt dependencies -RUN apt-get -q update \ - && apt-get install -qqy \ - btrfs-tools \ - ca-certificates \ - curl \ - iptables \ - rsync \ - supervisor \ - --no-install-recommends \ - && curl -sLO http://resin-packages.s3.amazonaws.com/docker-compose/${DOCKER_COMPOSE_VERSION}/docker-compose-linux-armel-${DOCKER_COMPOSE_VERSION}.tar.gz \ - && echo $DOCKER_COMPOSE_SHA256 docker-compose-linux-armel-${DOCKER_COMPOSE_VERSION}.tar.gz > docker-compose-linux-armel-${DOCKER_COMPOSE_VERSION}.tar.gz.sha256 \ - && sha256sum -c docker-compose-linux-armel-${DOCKER_COMPOSE_VERSION}.tar.gz.sha256 \ - && tar xzf docker-compose-linux-armel-${DOCKER_COMPOSE_VERSION}.tar.gz \ - && mv docker-compose-linux-armel-${DOCKER_COMPOSE_VERSION}/docker-compose-linux-armel /usr/bin/docker-compose \ - && rm -rf docker-compose-linux-armel-${DOCKER_COMPOSE_VERSION}* \ - && apt-get purge -qqy curl \ - && apt-get clean \ - && rm -rf /var/lib/apt/lists/ - -# Copy supervisord configuration files -COPY config/supervisor/ /etc/supervisor/ - -# Install dependencies -WORKDIR /app -COPY package.json postinstall.sh /app/ -RUN apt-get -q update \ - && apt-get install -qqy g++ libsqlite3-dev make --no-install-recommends \ - && JOBS=MAX npm install --unsafe-perm --production --no-optional \ - && npm dedupe \ - && npm cache clean \ - && rm -rf /tmp/* \ - && apt-get purge -qqy g++ libsqlite3-dev make binutils \ - && apt-get clean \ - && apt-get autoremove -qqy \ - && rm -rf /var/lib/apt/lists/ - -# Copy source -COPY . /app/ - -RUN /app/node_modules/.bin/coffee -c /app/src \ - && ln -sf /app/entry.sh /start # Needed for legacy - -RUN chmod +x /app/bin/gosuper - -ENV SUPERVISOR_IMAGE resin/armel-supervisor -ENV CONFIG_MOUNT_POINT /boot/config.json -ENV LED_FILE /dev/null - -ENTRYPOINT ["/app/entry.sh"] diff --git a/Dockerfile.armv7hf b/Dockerfile.armv7hf deleted file mode 100644 index 22e0b744..00000000 --- a/Dockerfile.armv7hf +++ /dev/null @@ -1,57 +0,0 @@ -FROM resin/armv7hf-node:0.10.40-slim - -COPY 01_nodoc /etc/dpkg/dpkg.cfg.d/ - -ENV DOCKER_COMPOSE_VERSION 1.7.1 -ENV DOCKER_COMPOSE_SHA256 3f0b8c69c66a2daa5fbb0c127cb76ca95d7125827a9c43dd3c36f9bc2ed6e0e5 - -# Supervisor apt dependencies -RUN apt-get -q update \ - && apt-get install -qqy \ - btrfs-tools \ - ca-certificates \ - curl \ - iptables \ - rsync \ - supervisor \ - --no-install-recommends \ - && curl -sLO http://resin-packages.s3.amazonaws.com/docker-compose/${DOCKER_COMPOSE_VERSION}/docker-compose-linux-armhf-${DOCKER_COMPOSE_VERSION}.tar.gz \ - && echo $DOCKER_COMPOSE_SHA256 docker-compose-linux-armhf-${DOCKER_COMPOSE_VERSION}.tar.gz > docker-compose-linux-armhf-${DOCKER_COMPOSE_VERSION}.tar.gz.sha256 \ - && sha256sum -c docker-compose-linux-armhf-${DOCKER_COMPOSE_VERSION}.tar.gz.sha256 \ - && tar xzf docker-compose-linux-armhf-${DOCKER_COMPOSE_VERSION}.tar.gz \ - && mv docker-compose-linux-armhf-${DOCKER_COMPOSE_VERSION}/docker-compose-linux-armhf /usr/bin/docker-compose \ - && rm -rf docker-compose-linux-armhf-${DOCKER_COMPOSE_VERSION}* \ - && apt-get purge -qqy curl \ - && apt-get clean \ - && rm -rf /var/lib/apt/lists/ - -# Copy supervisord configuration files -COPY config/supervisor/ /etc/supervisor/ - -# Install dependencies -WORKDIR /app -COPY package.json postinstall.sh /app/ -RUN apt-get -q update \ - && apt-get install -qqy g++ libsqlite3-dev make --no-install-recommends \ - && JOBS=MAX npm install --unsafe-perm --production --no-optional \ - && npm dedupe \ - && npm cache clean \ - && rm -rf /tmp/* \ - && apt-get purge -qqy g++ libsqlite3-dev make binutils \ - && apt-get clean \ - && apt-get autoremove -qqy \ - && rm -rf /var/lib/apt/lists/ - -# Copy source -COPY . /app/ - -RUN /app/node_modules/.bin/coffee -c /app/src \ - && ln -sf /app/entry.sh /start # Needed for legacy - -RUN chmod +x /app/bin/gosuper - -ENV SUPERVISOR_IMAGE resin/armv7hf-supervisor -ENV CONFIG_MOUNT_POINT /boot/config.json -ENV LED_FILE /dev/null - -ENTRYPOINT ["/app/entry.sh"] diff --git a/Dockerfile.i386 b/Dockerfile.i386 deleted file mode 100644 index 44cf1f5c..00000000 --- a/Dockerfile.i386 +++ /dev/null @@ -1,57 +0,0 @@ -FROM resin/i386-node:0.10.40-slim - -COPY 01_nodoc /etc/dpkg/dpkg.cfg.d/ - -ENV DOCKER_COMPOSE_VERSION 1.7.1 -ENV DOCKER_COMPOSE_SHA256 b926fd9a2a9d89358f1353867706f94558a62caaf3aa72bf10bcbbe31e1a44f0 - -# Supervisor apt dependencies -RUN apt-get -q update \ - && apt-get install -qqy \ - btrfs-tools \ - ca-certificates \ - curl \ - iptables \ - rsync \ - supervisor \ - --no-install-recommends \ - && curl -sLO http://resin-packages.s3.amazonaws.com/docker-compose/${DOCKER_COMPOSE_VERSION}/docker-compose-linux-i386-${DOCKER_COMPOSE_VERSION}.tar.gz \ - && echo $DOCKER_COMPOSE_SHA256 docker-compose-linux-i386-${DOCKER_COMPOSE_VERSION}.tar.gz > docker-compose-linux-i386-${DOCKER_COMPOSE_VERSION}.tar.gz.sha256 \ - && sha256sum -c docker-compose-linux-i386-${DOCKER_COMPOSE_VERSION}.tar.gz.sha256 \ - && tar xzf docker-compose-linux-i386-${DOCKER_COMPOSE_VERSION}.tar.gz \ - && mv docker-compose-linux-i386-${DOCKER_COMPOSE_VERSION}/docker-compose-linux-i386 /usr/bin/docker-compose \ - && rm -rf docker-compose-linux-i386-${DOCKER_COMPOSE_VERSION}* \ - && apt-get purge -qqy curl \ - && apt-get clean \ - && rm -rf /var/lib/apt/lists/ - -# Copy supervisord configuration files -COPY config/supervisor/ /etc/supervisor/ - -# Install dependencies -WORKDIR /app -COPY package.json postinstall.sh /app/ -RUN apt-get -q update \ - && apt-get install -qqy g++ libsqlite3-dev make --no-install-recommends \ - && JOBS=MAX npm install --unsafe-perm --production --no-optional \ - && npm dedupe \ - && npm cache clean \ - && rm -rf /tmp/* \ - && apt-get purge -qqy g++ libsqlite3-dev make binutils \ - && apt-get clean \ - && apt-get autoremove -qqy \ - && rm -rf /var/lib/apt/lists/ - -# Copy source -COPY . /app/ - -RUN /app/node_modules/.bin/coffee -c /app/src \ - && ln -sf /app/entry.sh /start # Needed for legacy - -RUN chmod +x /app/bin/gosuper - -ENV SUPERVISOR_IMAGE resin/i386-supervisor -ENV CONFIG_MOUNT_POINT /boot/config.json -ENV LED_FILE /dev/null - -ENTRYPOINT ["/app/entry.sh"] diff --git a/Dockerfile.rpi b/Dockerfile.rpi deleted file mode 100644 index 8d61353b..00000000 --- a/Dockerfile.rpi +++ /dev/null @@ -1,53 +0,0 @@ -FROM resin/rpi-node:0.10.40-slim - -COPY 01_nodoc /etc/dpkg/dpkg.cfg.d/ - -ENV DOCKER_COMPOSE_VERSION 1.7.1 -ENV DOCKER_COMPOSE_SHA256 3f0b8c69c66a2daa5fbb0c127cb76ca95d7125827a9c43dd3c36f9bc2ed6e0e5 - -# Supervisor apt dependencies -RUN apt-get -q update \ - && apt-get install -qqy \ - btrfs-tools \ - ca-certificates \ - curl \ - iptables \ - rsync \ - supervisor \ - --no-install-recommends \ - && curl -sLO http://resin-packages.s3.amazonaws.com/docker-compose/${DOCKER_COMPOSE_VERSION}/docker-compose-linux-armhf-${DOCKER_COMPOSE_VERSION}.tar.gz \ - && echo $DOCKER_COMPOSE_SHA256 docker-compose-linux-armhf-${DOCKER_COMPOSE_VERSION}.tar.gz > docker-compose-linux-armhf-${DOCKER_COMPOSE_VERSION}.tar.gz.sha256 \ - && sha256sum -c docker-compose-linux-armhf-${DOCKER_COMPOSE_VERSION}.tar.gz.sha256 \ - && tar xzf docker-compose-linux-armhf-${DOCKER_COMPOSE_VERSION}.tar.gz \ - && mv docker-compose-linux-armhf-${DOCKER_COMPOSE_VERSION}/docker-compose-linux-armhf /usr/bin/docker-compose \ - && rm -rf docker-compose-linux-armhf-${DOCKER_COMPOSE_VERSION}* \ - && apt-get purge -qqy curl \ - && apt-get clean \ - && rm -rf /var/lib/apt/lists/ - -# Copy supervisord configuration files -COPY config/supervisor/ /etc/supervisor/ - -# Install dependencies -WORKDIR /app -COPY package.json postinstall.sh /app/ -RUN apt-get -q update \ - && apt-get install -qqy g++ libsqlite3-dev make --no-install-recommends \ - && JOBS=MAX npm install --unsafe-perm --production --no-optional \ - && npm dedupe \ - && npm cache clean \ - && rm -rf /tmp/* \ - && apt-get purge -qqy g++ libsqlite3-dev make binutils \ - && apt-get clean \ - && apt-get autoremove -qqy \ - && rm -rf /var/lib/apt/lists/ - -# Copy source -COPY . /app/ - -RUN /app/node_modules/.bin/coffee -c /app/src \ - && ln -sf /app/entry.sh /start # Needed for legacy - -RUN chmod +x /app/bin/gosuper - -ENTRYPOINT ["/app/entry.sh"] diff --git a/config/supervisor/conf.d/go-supervisor.conf b/config/supervisor/conf.d/go-supervisor.conf deleted file mode 100644 index 5d48f9a6..00000000 --- a/config/supervisor/conf.d/go-supervisor.conf +++ /dev/null @@ -1,10 +0,0 @@ -[program:go-supervisor] -directory=/app -command=/app/bin/gosuper -redirect_stderr=true -autorestart=true -autostart=false -stdout_logfile=/var/log/go_supervisor_stdout.log -stderr_logfile=/var/log/go_supervisor_error.log -stdout_logfile_maxbytes=2MB -stdout_logfile_backups=5 diff --git a/config/supervisor/conf.d/resin-supervisor.conf b/config/supervisor/conf.d/resin-supervisor.conf deleted file mode 100644 index 377a936f..00000000 --- a/config/supervisor/conf.d/resin-supervisor.conf +++ /dev/null @@ -1,10 +0,0 @@ -[program:resin-supervisor] -directory=/app -command=node src/app.js -redirect_stderr=true -autorestart=true -autostart=false -stdout_logfile=/var/log/resin_supervisor_stdout.log -stderr_logfile=/var/log/resin_supervisor_error.log -stdout_logfile_maxbytes=2MB -stdout_logfile_backups=5 diff --git a/config/supervisor/supervisord.conf b/config/supervisor/supervisord.conf deleted file mode 100644 index b7976932..00000000 --- a/config/supervisor/supervisord.conf +++ /dev/null @@ -1,28 +0,0 @@ -; supervisor config file - -[unix_http_server] -file=/var/run/resin/supervisor.sock ; (the path to the socket file) -chmod=0700 ; sockef file mode (default 0700) - -[supervisord] -logfile=/var/log/supervisor/supervisord.log ; (main log file;default $CWD/supervisord.log) -pidfile=/var/run/resin/supervisord.pid ; (supervisord pidfile;default supervisord.pid) -childlogdir=/var/log/supervisor ; ('AUTO' child log dir, default $TEMP) - -; the below section must remain in the config file for RPC -; (supervisorctl/web interface) to work, additional interfaces may be -; added by defining them in separate rpcinterface: sections -[rpcinterface:supervisor] -supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface - -[supervisorctl] -serverurl=unix:///var/run/resin/supervisor.sock ; use a unix:// URL for a unix socket - -; The [include] section can just contain the "files" setting. This -; setting can list multiple files (separated by whitespace or -; newlines). It can also contain wildcards. The filenames are -; interpreted as relative to this file. Included files *cannot* -; include files themselves. - -[include] -files = /etc/supervisor/conf.d/*.conf diff --git a/entry.alpine.sh b/entry.alpine.sh deleted file mode 100755 index 0c55997f..00000000 --- a/entry.alpine.sh +++ /dev/null @@ -1,43 +0,0 @@ -#!/bin/sh - -set -e - -[ -d /dev/net ] || - mkdir -p /dev/net -[ -c /dev/net/tun ] || - mknod /dev/net/tun c 10 200 - -mkdir -p /var/log/supervisor && touch /var/log/supervisor/supervisord.log -mkdir -p /var/run/resin -mount -t tmpfs -o size=1m tmpfs /var/run/resin - -if [ -z "$GOSUPER_SOCKET" ]; then - export GOSUPER_SOCKET=/var/run/resin/gosuper.sock -fi -if [ -z "$DOCKER_SOCKET" ]; then - export DOCKER_SOCKET=/run/docker.sock -fi -if [ -z "$HOST_PROC" ]; then - export HOST_PROC=/mnt/root/proc -fi - -export DBUS_SYSTEM_BUS_ADDRESS="unix:path=/mnt/root/run/dbus/system_bus_socket" - -# If DOCKER_ROOT isn't set then default it -if [ -z "${DOCKER_ROOT}" ]; then - DOCKER_ROOT=/mnt/root/var/lib/rce -fi -# Mount the DOCKER_ROOT path equivalent in the container fs -DOCKER_LIB_PATH=${DOCKER_ROOT#/mnt/root} -if [ ! -d "${DOCKER_LIB_PATH}" ]; then - ln -s "${DOCKER_ROOT}" "${DOCKER_LIB_PATH}" -fi - -/usr/bin/supervisord -c /etc/supervisor/supervisord.conf - -supervisorctl -c /etc/supervisor/supervisord.conf start resin-supervisor -supervisorctl -c /etc/supervisor/supervisord.conf start go-supervisor - -tail -F \ - /var/log/supervisor/supervisord.log \ - /var/log/resin_supervisor_stdout.log diff --git a/postinstall.sh b/postinstall.sh deleted file mode 100755 index 799044c9..00000000 --- a/postinstall.sh +++ /dev/null @@ -1,19 +0,0 @@ -set -o errexit - -if [ "$NODE_ENV" = "production" ]; then - # Remove node-gyp cache - rm -rf ~/.node-gyp/ - # Remove cached git deps - rm -rf /tmp/* - # Remove the c files we no longer need (the sqlite3 node module has a massive ~5M c file) - find . -name '*.c' -delete - # And the tar files (sqlite3 module again) - find . -name '*.tar.*' -delete - # Who needs tests and docs? Pffft! - Ignoring errors because find isn't a fan of us deleting directories whilst it's trying to search within them. - find . -type d -name 'test' -exec rm -rf '{}' \; 2> /dev/null || true - find . -type d -name 'doc' -exec rm -rf '{}' \; 2> /dev/null || true - find . -type d -name 'man' -exec rm -rf '{}' \; 2> /dev/null || true - # And any benchmark results (ttyjs->socket.io->socket.io-client->active-x-obfuscator->zeparser has an 8MB benchmark.html) - find . -type d -name 'benchmark*' -exec rm -rf '{}' \; 2> /dev/null || true - find . -name 'benchmark*' -delete -fi From 8ad4411469555b7f14c9c1586ad9810289a47a6f Mon Sep 17 00:00:00 2001 From: Petros Angelatos Date: Wed, 6 Jul 2016 01:48:27 -0700 Subject: [PATCH 02/13] cleanup: remove unused tar file from old deltas Signed-off-by: Petros Angelatos --- empty.tar | Bin 10240 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 empty.tar diff --git a/empty.tar b/empty.tar deleted file mode 100644 index 025d5fa1f3b2a2d263ab5948f2a898ceec3a2847..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 10240 zcmeIuu?>VU5ClM%;tBwxKU~jOfCPO17(xO_o@_Qb$*a>@)Ai}~3@tSx9kb;+&$lwh zIMgyt< Date: Tue, 6 Sep 2016 13:41:17 +0000 Subject: [PATCH 03/13] churn: pretty format Makfile targets Signed-off-by: Petros Angelatos --- Makefile | 41 +++++++++++++++++++++++++++++++---------- 1 file changed, 31 insertions(+), 10 deletions(-) diff --git a/Makefile b/Makefile index 53d9799d..3fe6114c 100644 --- a/Makefile +++ b/Makefile @@ -103,7 +103,14 @@ ${DOCKERD_PROXY}: fi supervisor-dind: ${DOCKERD_PROXY} - cd tools/dind && docker build $(DOCKER_HTTP_PROXY) $(DOCKER_HTTPS_PROXY) $(DOCKER_NO_PROXY) --no-cache=$(DISABLE_CACHE) --build-arg PASSWORDLESS_DROPBEAR=$(PASSWORDLESS_DROPBEAR) -t resin/resin-supervisor-dind:$(SUPERVISOR_VERSION) . + cd tools/dind \ + && docker build \ + $(DOCKER_HTTP_PROXY) \ + $(DOCKER_HTTPS_PROXY) \ + $(DOCKER_NO_PROXY) \ + --no-cache=$(DISABLE_CACHE) \ + --build-arg PASSWORDLESS_DROPBEAR=$(PASSWORDLESS_DROPBEAR) \ + -t resin/resin-supervisor-dind:$(SUPERVISOR_VERSION) . run-supervisor: stop-supervisor supervisor-dind cd tools/dind \ @@ -174,16 +181,30 @@ gosuper: go-builder docker run --rm --name resin_build_gosuper_$(JOB_NAME) -v $(shell pwd)/gosuper/bin:/usr/src/app/bin -e USER_ID=$(shell id -u) -e GROUP_ID=$(shell id -g) -e GOARCH=$(GOARCH) -e GOARM=$(GOARM) resin/go-supervisor-builder:$(SUPERVISOR_VERSION) mv gosuper/bin/linux_$(GOARCH)/gosuper bin/gosuper -test-gosuper: go-builder - -docker rm --volumes -f resin_test_gosuper_$(JOB_NAME) || true - docker run --rm --name resin_test_gosuper_$(JOB_NAME) -v /var/run/dbus:/mnt/root/run/dbus -e DBUS_SYSTEM_BUS_ADDRESS="unix:path=/mnt/root/run/dbus/system_bus_socket" resin/go-supervisor-builder:$(SUPERVISOR_VERSION) bash -c "cd src/resin-supervisor/gosuper && ./test_formatting.sh && go test -v ./gosuper" +test-gosuper: gosuper + docker run \ + --rm \ + -v /var/run/dbus:/mnt/root/run/dbus \ + -e DBUS_SYSTEM_BUS_ADDRESS="unix:path=/mnt/root/run/dbus/system_bus_socket" \ + resin/go-supervisor-$(ARCH):$(SUPERVISOR_VERSION) bash -c \ + './test_formatting.sh && go test -v ./gosuper' -format-gosuper: go-builder - -docker rm --volumes -f resin_test_gosuper_$(JOB_NAME) || true - docker run --rm --name resin_test_gosuper_$(JOB_NAME) -v $(shell pwd)/gosuper:/usr/src/app/src/resin-supervisor/gosuper resin/go-supervisor-builder:$(SUPERVISOR_VERSION) bash -c "cd src/resin-supervisor/gosuper && go fmt ./..." +format-gosuper: gosuper + docker run \ + --rm \ + -v $(shell pwd)/gosuper:/go/src/resin-supervisor/gosuper \ + resin/go-supervisor-$(ARCH):$(SUPERVISOR_VERSION) \ + go fmt ./... -test-integration: go-builder - -docker rm --volumes -f resin_test_integration_$(JOB_NAME) || true - docker run --rm --name resin_test_integration_$(JOB_NAME) --net=host -e SUPERVISOR_IP="$(shell docker inspect --format '{{ .NetworkSettings.IPAddress }}' resin_supervisor_1)" --volumes-from resin_supervisor_1 -v /var/run/dbus:/mnt/root/run/dbus -e DBUS_SYSTEM_BUS_ADDRESS="unix:path=/mnt/root/run/dbus/system_bus_socket" resin/go-supervisor-builder:$(SUPERVISOR_VERSION) bash -c "cd src/resin-supervisor/gosuper && go test -v ./supertest" +test-integration: gosuper + docker run \ + --rm \ + --net=host \ + -e SUPERVISOR_IP="$(shell docker inspect --format '{{ .NetworkSettings.IPAddress }}' resin_supervisor_1)" \ + --volumes-from resin_supervisor_1 \ + -v /var/run/dbus:/mnt/root/run/dbus \ + -e DBUS_SYSTEM_BUS_ADDRESS="unix:path=/mnt/root/run/dbus/system_bus_socket" \ + resin/go-supervisor-$(ARCH):$(SUPERVISOR_VERSION) \ + go test -v ./supertest .PHONY: supervisor deploy supervisor-dind run-supervisor From 488ca416210a90c8e461ffac49cb348488c37ed4 Mon Sep 17 00:00:00 2001 From: Petros Angelatos Date: Fri, 3 Jun 2016 17:21:46 +0000 Subject: [PATCH 04/13] build: implement multi-Dockerfile build process This build strategy lends itself to how Rockerfiles work. In the build Dockerfile all the build utilities (e.g gcc, python) are installed and run the build process to produce some build artifacts. There are two build Dockerfiles, one for the nodejs part and one for the golang part. The build artifacts of these are combined into the runtime Dockerfile. For all this to work there is some minimal glue implemented in the Makefile. Part of this commit is a switch of the base image the runtime is based on to the minimal OpenEmbedded one produced by #198 Signed-off-by: Petros Angelatos --- .dockerignore | 2 +- .gitignore | 6 +++ Dockerfile.build.template | 65 ++++++++++++++++++++++++++++ Dockerfile.runtime.template | 20 +++++++++ Makefile | 84 ++++++++++++++++++++----------------- automation/jenkins_build.sh | 6 +-- gosuper/Dockerfile | 25 +++++++---- gosuper/build_gosuper.sh | 14 ------- package.json | 6 +-- 9 files changed, 158 insertions(+), 70 deletions(-) create mode 100644 Dockerfile.build.template create mode 100644 Dockerfile.runtime.template delete mode 100644 gosuper/build_gosuper.sh diff --git a/.dockerignore b/.dockerignore index 6fbeb947..f406d333 100644 --- a/.dockerignore +++ b/.dockerignore @@ -9,5 +9,5 @@ coffeelint.json automation tools README.md -gosuper retry_docker_push.sh +base-image diff --git a/.gitignore b/.gitignore index 2003f286..34d39b82 100644 --- a/.gitignore +++ b/.gitignore @@ -12,3 +12,9 @@ base-image/build/cache base-image/build/downloads base-image/build/sstate-cache base-image/build/tmp-glibc + +Dockerfile.build.* +Dockerfile.runtime.* +!Dockerfile.build.template +!Dockerfile.runtime.template +build diff --git a/Dockerfile.build.template b/Dockerfile.build.template new file mode 100644 index 00000000..1fe87cdd --- /dev/null +++ b/Dockerfile.build.template @@ -0,0 +1,65 @@ +# Build nodejs dependencies + +# The node version here should match the version of the runtime image which is +# specified in the base-image subdirectory in the project +FROM resin/%%ARCH%%-node:6.5-slim + +WORKDIR /usr/src/app + +RUN apt-get update \ + && apt-get install -y \ + g++ \ + libsqlite3-dev \ + make \ + python \ + rsync \ + wget \ + && rm -rf /var/lib/apt/lists/ \ + && npm install -g coffee-script + +ENV DOCKER_COMPOSE_VERSION 1.7.1 + +ENV DOCKER_COMPOSE_SHA256_amd64 37df85ee18bf0e2a8d71cbfb8198b1c06cc388f19118be7bdfc4d6db112af834 +ENV DOCKER_COMPOSE_SHA256_i386 b926fd9a2a9d89358f1353867706f94558a62caaf3aa72bf10bcbbe31e1a44f0 +ENV DOCKER_COMPOSE_SHA256_rpi 3f0b8c69c66a2daa5fbb0c127cb76ca95d7125827a9c43dd3c36f9bc2ed6e0e5 +ENV DOCKER_COMPOSE_SHA256_armv7hf 3f0b8c69c66a2daa5fbb0c127cb76ca95d7125827a9c43dd3c36f9bc2ed6e0e5 +ENV DOCKER_COMPOSE_SHA256_armel a1025fed97536e2698798ea277a014ec5e1eae816a8cf3155ecbe9679e3e7bac + +RUN set -x \ + && mkdir -p rootfs-overlay/usr/bin/ \ + && ln -s /lib rootfs-overlay/lib64 \ + && pkgname='docker-compose' \ + && arch=%%ARCH%% \ + && if [ $arch = 'rpi' -o $arch = 'armv7hf' ]; then arch=armhf; fi \ + && base="http://resin-packages.s3.amazonaws.com/${pkgname}" \ + && pkgver=$DOCKER_COMPOSE_VERSION \ + && checksum=$DOCKER_COMPOSE_SHA256_%%ARCH%% \ + && wget "${base}/${pkgver}/${pkgname}-linux-${arch}-${pkgver}.tar.gz" \ + && echo "$checksum ${pkgname}-linux-${arch}-${pkgver}.tar.gz" | sha256sum -c \ + && tar xzf "${pkgname}-linux-${arch}-${pkgver}.tar.gz" --strip-components=1 -C rootfs-overlay/usr/bin \ + && mv "rootfs-overlay/usr/bin/${pkgname}-linux-${arch}" rootfs-overlay/usr/bin/docker-compose + +COPY package.json /usr/src/app/ + +RUN JOBS=MAX npm install --unsafe-perm --production --no-optional \ + && npm dedupe + +COPY src /usr/src/app/src + +RUN coffee -c src + +# Remove tar files (sqlite3 module) and tests to reduce space +RUN find . -name '*.tar.*' -delete \ + && find . -path '*/test/*' -delete + +# Create /var/run/resin for the gosuper to place its socket in +RUN mkdir -p rootfs-overlay/var/run/resin + +COPY entry.sh run.sh package.json rootfs-overlay/usr/src/app/ + +COPY inittab rootfs-overlay/etc/inittab + +CMD rsync -a --delete node_modules src rootfs-overlay /build + +# -*- mode: dockerfile -*- +# vi: set ft=dockerfile : diff --git a/Dockerfile.runtime.template b/Dockerfile.runtime.template new file mode 100644 index 00000000..73f36bd1 --- /dev/null +++ b/Dockerfile.runtime.template @@ -0,0 +1,20 @@ +# Minimal runtime image +FROM resin/%%ARCH%%-supervisor-base + +WORKDIR /usr/src/app + +COPY ./build/%%ARCH%%/src ./src +COPY ./build/%%ARCH%%/node_modules ./node_modules +COPY ./build/%%ARCH%%/gosuper ./gosuper +COPY ./build/%%ARCH%%/rootfs-overlay/ / + +VOLUME /data + +ENV CONFIG_MOUNT_POINT /boot/config.json +ENV LED_FILE /dev/null +ENV SUPERVISOR_IMAGE resin/%%ARCH%%-supervisor + +CMD [ "/sbin/init" ] + +# -*- mode: dockerfile -*- +# vi: set ft=dockerfile : diff --git a/Makefile b/Makefile index 3fe6114c..7ce54503 100644 --- a/Makefile +++ b/Makefile @@ -21,12 +21,10 @@ endif DISABLE_CACHE = 'false' ARCH = rpi# rpi/amd64/i386/armv7hf/armel -BASE_DISTRO = DEPLOY_REGISTRY = SUPERVISOR_VERSION = master -JOB_NAME = 1 all: supervisor @@ -36,15 +34,8 @@ MIXPANEL_TOKEN = bananasbananas PASSWORDLESS_DROPBEAR = false -ifdef BASE_DISTRO -$(info BASE_DISTRO SPECIFIED. START BUILDING ALPINE SUPERVISOR) - IMAGE = "resin/$(ARCH)-supervisor:$(SUPERVISOR_VERSION)-alpine" - DOCKERFILE = alpine.$(ARCH) -else -$(info BASE_DISTRO NOT SPECIFIED. START BUILDING DEBIAN SUPERVISOR) - IMAGE = "resin/$(ARCH)-supervisor:$(SUPERVISOR_VERSION)" - DOCKERFILE = $(ARCH) -endif +IMAGE = "resin/$(ARCH)-supervisor:$(SUPERVISOR_VERSION)" +DOCKERFILE = $(ARCH) SUPERVISOR_IMAGE=$(DEPLOY_REGISTRY)$(IMAGE) @@ -78,9 +69,6 @@ endif SUPERVISOR_EXTRA_MOUNTS = -clean: - -rm Dockerfile - DOCKERD_PROXY=tools/dind/config/services/docker.service.d/proxy.conf ${DOCKERD_PROXY}: rm -f ${DOCKERD_PROXY} @@ -143,43 +131,61 @@ refresh-supervisor-src: && echo " * Restarting supervisor container.." \ && docker exec -ti resin_supervisor_1 docker restart resin_supervisor -supervisor: gosuper - cp Dockerfile.$(DOCKERFILE) Dockerfile - echo "ENV VERSION "`jq -r .version package.json` >> Dockerfile - echo "ENV DEFAULT_PUBNUB_PUBLISH_KEY $(PUBNUB_PUBLISH_KEY)" >> Dockerfile - echo "ENV DEFAULT_PUBNUB_SUBSCRIBE_KEY $(PUBNUB_SUBSCRIBE_KEY)" >> Dockerfile - echo "ENV DEFAULT_MIXPANEL_TOKEN $(MIXPANEL_TOKEN)" >> Dockerfile +supervisor: nodesuper gosuper + sed 's/%%ARCH%%/$(ARCH)/g' Dockerfile.runtime.template > Dockerfile.runtime.$(ARCH) + echo "ENV VERSION "`jq -r .version package.json` >> Dockerfile.runtime.$(ARCH) + echo "ENV DEFAULT_PUBNUB_PUBLISH_KEY $(PUBNUB_PUBLISH_KEY)" >> Dockerfile.runtime.$(ARCH) + echo "ENV DEFAULT_PUBNUB_SUBSCRIBE_KEY $(PUBNUB_SUBSCRIBE_KEY)" >> Dockerfile.runtime.$(ARCH) + echo "ENV DEFAULT_MIXPANEL_TOKEN $(MIXPANEL_TOKEN)" >> Dockerfile.runtime.$(ARCH) ifdef rt_https_proxy - echo "ENV HTTPS_PROXY $(rt_https_proxy)" >> Dockerfile - echo "ENV https_proxy $(rt_https_proxy)" >> Dockerfile + echo "ENV HTTPS_PROXY $(rt_https_proxy)" >> Dockerfile.runtime.$(ARCH) + echo "ENV https_proxy $(rt_https_proxy)" >> Dockerfile.runtime.$(ARCH) endif ifdef rt_http_proxy - echo "ENV HTTP_PROXY $(rt_http_proxy)" >> Dockerfile - echo "ENV http_proxy $(rt_http_proxy)" >> Dockerfile + echo "ENV HTTP_PROXY $(rt_http_proxy)" >> Dockerfile.runtime.$(ARCH) + echo "ENV http_proxy $(rt_http_proxy)" >> Dockerfile.runtime.$(ARCH) endif ifdef rt_no_proxy - echo "ENV no_proxy $(rt_no_proxy)" >> Dockerfile + echo "ENV no_proxy $(rt_no_proxy)" >> Dockerfile.runtime.$(ARCH) endif - docker build $(DOCKER_HTTP_PROXY) $(DOCKER_HTTPS_PROXY) $(DOCKER_NO_PROXY) --no-cache=$(DISABLE_CACHE) -t $(IMAGE) . - -rm Dockerfile + docker build \ + $(DOCKER_HTTP_PROXY) \ + $(DOCKER_HTTPS_PROXY) \ + $(DOCKER_NO_PROXY) \ + -f Dockerfile.runtime.$(ARCH) \ + --pull \ + -t $(IMAGE) . -lint: supervisor - docker run --rm --entrypoint='sh' $(IMAGE) -c 'npm install && npm run lint' +lint: + docker run --rm resin/node-supervisor-$(ARCH):$(SUPERVISOR_VERSION) bash -c 'npm install resin-lint && npm run lint' deploy: supervisor docker tag -f $(IMAGE) $(SUPERVISOR_IMAGE) bash retry_docker_push.sh $(SUPERVISOR_IMAGE) -go-builder: - -cp tools/dind/config.json ./gosuper/ - cd gosuper && docker build $(DOCKER_HTTP_PROXY) $(DOCKER_HTTPS_PROXY) $(DOCKER_NO_PROXY) -t resin/go-supervisor-builder:$(SUPERVISOR_VERSION) . - -rm ./gosuper/config.json +nodesuper: + sed 's/%%ARCH%%/$(ARCH)/g' Dockerfile.build.template > Dockerfile.build.$(ARCH) + docker build \ + $(DOCKER_HTTP_PROXY) \ + $(DOCKER_HTTPS_PROXY) \ + $(DOCKER_NO_PROXY) \ + -f Dockerfile.build.$(ARCH) \ + -t resin/node-supervisor-$(ARCH):$(SUPERVISOR_VERSION) . + docker run --rm \ + -v `pwd`/build/$(ARCH):/build \ + resin/node-supervisor-$(ARCH):$(SUPERVISOR_VERSION) -gosuper: go-builder - -mkdir -p bin - -docker rm --volumes -f resin_build_gosuper_$(JOB_NAME) || true - docker run --rm --name resin_build_gosuper_$(JOB_NAME) -v $(shell pwd)/gosuper/bin:/usr/src/app/bin -e USER_ID=$(shell id -u) -e GROUP_ID=$(shell id -g) -e GOARCH=$(GOARCH) -e GOARM=$(GOARM) resin/go-supervisor-builder:$(SUPERVISOR_VERSION) - mv gosuper/bin/linux_$(GOARCH)/gosuper bin/gosuper +gosuper: + cd gosuper && docker build \ + $(DOCKER_HTTP_PROXY) \ + $(DOCKER_HTTPS_PROXY) \ + $(DOCKER_NO_PROXY) \ + --build-arg GOARCH=$(GOARCH) \ + --build-arg GOARM=$(GOARM) \ + -t resin/go-supervisor-$(ARCH):$(SUPERVISOR_VERSION) . + docker run --rm \ + -v `pwd`/build/$(ARCH):/build \ + resin/go-supervisor-$(ARCH):$(SUPERVISOR_VERSION) test-gosuper: gosuper docker run \ @@ -207,4 +213,4 @@ test-integration: gosuper resin/go-supervisor-$(ARCH):$(SUPERVISOR_VERSION) \ go test -v ./supertest -.PHONY: supervisor deploy supervisor-dind run-supervisor +.PHONY: supervisor deploy supervisor-dind run-supervisor gosuper nodesuper diff --git a/automation/jenkins_build.sh b/automation/jenkins_build.sh index 963b73d6..556d93e6 100755 --- a/automation/jenkins_build.sh +++ b/automation/jenkins_build.sh @@ -12,14 +12,12 @@ docker pull resin/${ARCH}-supervisor:${ESCAPED_BRANCH_NAME} || docker pull resin make SUPERVISOR_VERSION=${VERSION} JOB_NAME=${JOB_NAME} test-gosuper MAKE_ARGS="ARCH=${ARCH} \ - JOB_NAME=${JOB_NAME} \ - BASE_DISTRO=${BASE_DISTRO} \ PUBNUB_SUBSCRIBE_KEY=${PUBNUB_SUBSCRIBE_KEY} \ PUBNUB_PUBLISH_KEY=${PUBNUB_PUBLISH_KEY} \ MIXPANEL_TOKEN=${MIXPANEL_TOKEN}" -make ${MAKE_ARGS} \ - lint +# Disabled until this is merged in npm https://github.com/npm/npm/pull/13257 +# make ${MAKE_ARGS} lint make ${MAKE_ARGS} \ SUPERVISOR_VERSION=${ESCAPED_BRANCH_NAME} \ diff --git a/gosuper/Dockerfile b/gosuper/Dockerfile index 7fbe55db..ee628368 100644 --- a/gosuper/Dockerfile +++ b/gosuper/Dockerfile @@ -1,15 +1,22 @@ +# Build golang supervisor FROM golang:1.5.1 +RUN apt-get update \ + && apt-get install -y \ + rsync \ + && rm -rf /var/lib/apt/lists/ + +COPY . /go/src/resin-supervisor/gosuper + +WORKDIR /go/src/resin-supervisor/gosuper + ENV GOOS linux -ENV GOPATH /usr/src/app -WORKDIR /usr/src/app +ARG GOARCH=amd64 +ARG GOARM='' -COPY . src/resin-supervisor/gosuper +RUN go install -a -v ./gosuper \ + && cd /go/bin \ + && find -type f -name gosuper -exec mv {} /go/bin/gosuper \; -RUN chmod +x src/resin-supervisor/gosuper/build_gosuper.sh -RUN chmod +x src/resin-supervisor/gosuper/test_formatting.sh - -# Run go install with -a (force rebuilding of all packages) -# and -v (print package names as they are built) -CMD cd ./src/resin-supervisor/gosuper && ./build_gosuper.sh +CMD rsync -a --delete /go/bin/gosuper /build diff --git a/gosuper/build_gosuper.sh b/gosuper/build_gosuper.sh deleted file mode 100644 index cfe4c4f2..00000000 --- a/gosuper/build_gosuper.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/bash - -go install -a -v ./gosuper -RETURN_VALUE=$? - -HOSTARCH=$(uname -m) -# For consistency, always keep the binary within a linux_$GOARCH folder -if [[ ( $GOARCH == "amd64" && $HOSTARCH == "x86_64" ) || ( $GOARCH == "arm" && $HOSTARCH == "armv7l" ) ]]; then - mkdir -p $GOPATH/bin/linux_$GOARCH - cp $GOPATH/bin/gosuper $GOPATH/bin/linux_$GOARCH/ -fi -chown -R $USER_ID:$GROUP_ID $GOPATH/bin - -exit $RETURN_VALUE diff --git a/package.json b/package.json index 0e4ec4df..2afc2963 100644 --- a/package.json +++ b/package.json @@ -2,9 +2,9 @@ "name": "resin-supervisor", "version": "2.1.1", "scripts": { - "postinstall": "sh postinstall.sh", "start": "./entry.sh", - "lint": "resin-lint src/" + "lint": "resin-lint src/", + "start": "./entry.sh" }, "dependencies": { "JSONStream": "^1.1.2", @@ -33,7 +33,7 @@ "resin-register-device": "^2.0.0", "rimraf": "^2.5.4", "rwlock": "^5.0.0", - "sqlite3": "3.0.9", + "sqlite3": "^3.1.0", "typed-error": "~0.1.0", "yamljs": "^0.2.7" }, From eee400f39f705b8b420e2511c80bcc94e9bc84fa Mon Sep 17 00:00:00 2001 From: Petros Angelatos Date: Wed, 6 Jul 2016 01:45:32 -0700 Subject: [PATCH 05/13] integrate with busybox init system busybox's init uses /etc/inittab for configuration just like sysvinit, however it doesn't use any runlevels. the tty part of inittab is appended to "/dev/", and it becomes connected to the stdout of the spawned process Signed-off-by: Petros Angelatos --- entry.sh | 29 +++-------------------------- inittab | 7 +++++++ package.json | 3 +-- run.sh | 22 ++++++++++++++++++++++ 4 files changed, 33 insertions(+), 28 deletions(-) create mode 100644 inittab create mode 100755 run.sh diff --git a/entry.sh b/entry.sh index 41186c75..fbd3cfb5 100755 --- a/entry.sh +++ b/entry.sh @@ -1,45 +1,22 @@ #!/bin/sh -set -e +set -o errexit [ -d /dev/net ] || mkdir -p /dev/net [ -c /dev/net/tun ] || mknod /dev/net/tun c 10 200 -cd /app - -mkdir -p /var/log/supervisor && touch /var/log/supervisor/supervisord.log -mkdir -p /var/run/resin mount -t tmpfs -o size=1m tmpfs /var/run/resin -if [ -z "$GOSUPER_SOCKET" ]; then - export GOSUPER_SOCKET=/var/run/resin/gosuper.sock -fi -if [ -z "$DOCKER_SOCKET" ]; then - export DOCKER_SOCKET=/run/docker.sock -fi -if [ -z "$HOST_PROC" ]; then - export HOST_PROC=/mnt/root/proc -fi - -export DBUS_SYSTEM_BUS_ADDRESS="unix:path=/mnt/root/run/dbus/system_bus_socket" - # If DOCKER_ROOT isn't set then default it if [ -z "${DOCKER_ROOT}" ]; then DOCKER_ROOT=/mnt/root/var/lib/rce fi + # Mount the DOCKER_ROOT path equivalent in the container fs DOCKER_LIB_PATH=${DOCKER_ROOT#/mnt/root} + if [ ! -d "${DOCKER_LIB_PATH}" ]; then ln -s "${DOCKER_ROOT}" "${DOCKER_LIB_PATH}" fi - -/usr/bin/supervisord -c /etc/supervisor/supervisord.conf - -supervisorctl start resin-supervisor -supervisorctl start go-supervisor - -tail -F \ - /var/log/supervisor/supervisord.log \ - /var/log/resin_supervisor_stdout.log diff --git a/inittab b/inittab new file mode 100644 index 00000000..2324807a --- /dev/null +++ b/inittab @@ -0,0 +1,7 @@ +# busybox inittab +# format: tty:ignored:action:command + +stdout::sysinit:/usr/src/app/entry.sh + +stdout::respawn:/usr/src/app/run.sh node /usr/src/app/src/app.js +stdout::respawn:/usr/src/app/run.sh /usr/src/app/gosuper diff --git a/package.json b/package.json index 2afc2963..688909cb 100644 --- a/package.json +++ b/package.json @@ -3,8 +3,7 @@ "version": "2.1.1", "scripts": { "start": "./entry.sh", - "lint": "resin-lint src/", - "start": "./entry.sh" + "lint": "resin-lint src/" }, "dependencies": { "JSONStream": "^1.1.2", diff --git a/run.sh b/run.sh new file mode 100755 index 00000000..e3bace86 --- /dev/null +++ b/run.sh @@ -0,0 +1,22 @@ +#!/bin/sh + +if [ -z "$GOSUPER_SOCKET" ]; then + export GOSUPER_SOCKET=/var/run/resin/gosuper.sock +fi + +if [ -z "$DOCKER_SOCKET" ]; then + export DOCKER_SOCKET=/run/docker.sock +fi + +if [ -z "$HOST_PROC" ]; then + export HOST_PROC=/mnt/root/proc +fi + +export DBUS_SYSTEM_BUS_ADDRESS="unix:path=/mnt/root/run/dbus/system_bus_socket" + +# If DOCKER_ROOT isn't set then default it +if [ -z "${DOCKER_ROOT}" ]; then + DOCKER_ROOT=/mnt/root/var/lib/rce +fi + +exec $@ From e70ee292a61388270081cd43b6b52a27d9961924 Mon Sep 17 00:00:00 2001 From: Petros Angelatos Date: Thu, 28 Jul 2016 23:15:00 -0700 Subject: [PATCH 06/13] minimise ENV commands to have less image layers Signed-off-by: Petros Angelatos --- Dockerfile.runtime.template | 6 +++--- Makefile | 16 ++++++++-------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/Dockerfile.runtime.template b/Dockerfile.runtime.template index 73f36bd1..16e387bf 100644 --- a/Dockerfile.runtime.template +++ b/Dockerfile.runtime.template @@ -10,9 +10,9 @@ COPY ./build/%%ARCH%%/rootfs-overlay/ / VOLUME /data -ENV CONFIG_MOUNT_POINT /boot/config.json -ENV LED_FILE /dev/null -ENV SUPERVISOR_IMAGE resin/%%ARCH%%-supervisor +ENV CONFIG_MOUNT_POINT /boot/config.json \ + LED_FILE /dev/null \ + SUPERVISOR_IMAGE resin/%%ARCH%%-supervisor CMD [ "/sbin/init" ] diff --git a/Makefile b/Makefile index 7ce54503..2e0deb5b 100644 --- a/Makefile +++ b/Makefile @@ -133,17 +133,17 @@ refresh-supervisor-src: supervisor: nodesuper gosuper sed 's/%%ARCH%%/$(ARCH)/g' Dockerfile.runtime.template > Dockerfile.runtime.$(ARCH) - echo "ENV VERSION "`jq -r .version package.json` >> Dockerfile.runtime.$(ARCH) - echo "ENV DEFAULT_PUBNUB_PUBLISH_KEY $(PUBNUB_PUBLISH_KEY)" >> Dockerfile.runtime.$(ARCH) - echo "ENV DEFAULT_PUBNUB_SUBSCRIBE_KEY $(PUBNUB_SUBSCRIBE_KEY)" >> Dockerfile.runtime.$(ARCH) - echo "ENV DEFAULT_MIXPANEL_TOKEN $(MIXPANEL_TOKEN)" >> Dockerfile.runtime.$(ARCH) + echo "ENV VERSION $(shell jq -r .version package.json) \\" >> Dockerfile.runtime.$(ARCH) + echo " DEFAULT_PUBNUB_PUBLISH_KEY $(PUBNUB_PUBLISH_KEY) \\" >> Dockerfile.runtime.$(ARCH) + echo " DEFAULT_PUBNUB_SUBSCRIBE_KEY $(PUBNUB_SUBSCRIBE_KEY) \\" >> Dockerfile.runtime.$(ARCH) + echo " DEFAULT_MIXPANEL_TOKEN $(MIXPANEL_TOKEN)" >> Dockerfile.runtime.$(ARCH) ifdef rt_https_proxy - echo "ENV HTTPS_PROXY $(rt_https_proxy)" >> Dockerfile.runtime.$(ARCH) - echo "ENV https_proxy $(rt_https_proxy)" >> Dockerfile.runtime.$(ARCH) + echo "ENV HTTPS_PROXY $(rt_https_proxy) \\" >> Dockerfile.runtime.$(ARCH) + echo " https_proxy $(rt_https_proxy)" >> Dockerfile.runtime.$(ARCH) endif ifdef rt_http_proxy - echo "ENV HTTP_PROXY $(rt_http_proxy)" >> Dockerfile.runtime.$(ARCH) - echo "ENV http_proxy $(rt_http_proxy)" >> Dockerfile.runtime.$(ARCH) + echo "ENV HTTP_PROXY $(rt_http_proxy) \\" >> Dockerfile.runtime.$(ARCH) + echo " http_proxy $(rt_http_proxy)" >> Dockerfile.runtime.$(ARCH) endif ifdef rt_no_proxy echo "ENV no_proxy $(rt_no_proxy)" >> Dockerfile.runtime.$(ARCH) From 429aa1c8d28168cfd4f8908915452a3b29345f1a Mon Sep 17 00:00:00 2001 From: Petros Angelatos Date: Wed, 6 Jul 2016 22:10:47 -0700 Subject: [PATCH 07/13] do a more comprehensive cleanup of node_modules Signed-off-by: Petros Angelatos --- Dockerfile.build.template | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/Dockerfile.build.template b/Dockerfile.build.template index 1fe87cdd..5a656834 100644 --- a/Dockerfile.build.template +++ b/Dockerfile.build.template @@ -48,9 +48,17 @@ COPY src /usr/src/app/src RUN coffee -c src -# Remove tar files (sqlite3 module) and tests to reduce space -RUN find . -name '*.tar.*' -delete \ - && find . -path '*/test/*' -delete +# Remove various uneeded filetypes in order to reduce space +RUN find . -path '*/coverage/*' -o -path '*/test/*' -o -path '*/.nyc_output/*' \ + -o -name '*.tar.*' -o -name '*.in' -o -name '*.cc' \ + -o -name '*.c' -o -name '*.coffee' -o -name '*.eslintrc' \ + -o -name '*.h' -o -name '*.html' -o -name '*.markdown' \ + -o -name '*.md' -o -name '*.patch' -o -name '*.png' \ + -o -name '*.yml' \ + -delete \ + && find . -type f -path '*/node_modules/lodash*' ! -name lodash.js -delete \ + && find . -type f -path '*/node_modules/sqlite3/deps*' -delete \ + && find . -type f -path '*/node_modules/knex/build*' -delete # Create /var/run/resin for the gosuper to place its socket in RUN mkdir -p rootfs-overlay/var/run/resin From 83393c04e310c0afb9755a394203f2dc38dc558c Mon Sep 17 00:00:00 2001 From: Petros Angelatos Date: Tue, 5 Jul 2016 18:07:22 -0700 Subject: [PATCH 08/13] switch to golang 1.6 to make the binary upx-able https://github.com/golang/go/issues/13974 https://github.com/golang/go/commit/5e7110b92b959d22eba421953beaf1de8580f8f5 Signed-off-by: Petros Angelatos --- gosuper/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gosuper/Dockerfile b/gosuper/Dockerfile index ee628368..d19ea5f5 100644 --- a/gosuper/Dockerfile +++ b/gosuper/Dockerfile @@ -1,5 +1,5 @@ # Build golang supervisor -FROM golang:1.5.1 +FROM golang:1.6 RUN apt-get update \ && apt-get install -y \ From ca91fd179ba8d5dfe2df11293e24228f29cdd400 Mon Sep 17 00:00:00 2001 From: Petros Angelatos Date: Wed, 6 Jul 2016 02:29:16 -0700 Subject: [PATCH 09/13] compress gosuper with upx Signed-off-by: Petros Angelatos --- gosuper/Dockerfile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gosuper/Dockerfile b/gosuper/Dockerfile index d19ea5f5..8105a153 100644 --- a/gosuper/Dockerfile +++ b/gosuper/Dockerfile @@ -4,6 +4,7 @@ FROM golang:1.6 RUN apt-get update \ && apt-get install -y \ rsync \ + upx-ucl \ && rm -rf /var/lib/apt/lists/ COPY . /go/src/resin-supervisor/gosuper @@ -17,6 +18,7 @@ ARG GOARM='' RUN go install -a -v ./gosuper \ && cd /go/bin \ - && find -type f -name gosuper -exec mv {} /go/bin/gosuper \; + && find -type f -name gosuper -exec mv {} /go/bin/gosuper \; \ + && upx --best /go/bin/gosuper CMD rsync -a --delete /go/bin/gosuper /build From fd44a9278293e0187a5ccd2c6816ac99a2222144 Mon Sep 17 00:00:00 2001 From: Petros Angelatos Date: Wed, 6 Jul 2016 01:47:48 -0700 Subject: [PATCH 10/13] don't install coffeescript in runtime image Signed-off-by: Petros Angelatos --- Dockerfile.build.template | 14 +++++++++----- package.json | 3 ++- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/Dockerfile.build.template b/Dockerfile.build.template index 5a656834..2425767f 100644 --- a/Dockerfile.build.template +++ b/Dockerfile.build.template @@ -14,8 +14,7 @@ RUN apt-get update \ python \ rsync \ wget \ - && rm -rf /var/lib/apt/lists/ \ - && npm install -g coffee-script + && rm -rf /var/lib/apt/lists/ ENV DOCKER_COMPOSE_VERSION 1.7.1 @@ -41,12 +40,17 @@ RUN set -x \ COPY package.json /usr/src/app/ -RUN JOBS=MAX npm install --unsafe-perm --production --no-optional \ - && npm dedupe +# First install devDependencies too in order to run the build +RUN JOBS=MAX npm install --unsafe-perm COPY src /usr/src/app/src -RUN coffee -c src +RUN npm run build + +# Re-install just production modules. This should be fast due to npm cache from previous layer +RUN rm -rf node_modules \ + && JOBS=MAX npm install --unsafe-perm --production --no-optional \ + && npm dedupe # Remove various uneeded filetypes in order to reduce space RUN find . -path '*/coverage/*' -o -path '*/test/*' -o -path '*/.nyc_output/*' \ diff --git a/package.json b/package.json index 688909cb..6b086830 100644 --- a/package.json +++ b/package.json @@ -3,6 +3,7 @@ "version": "2.1.1", "scripts": { "start": "./entry.sh", + "build": "coffee -c src", "lint": "resin-lint src/" }, "dependencies": { @@ -11,7 +12,6 @@ "bluebird": "^2.9.24", "body-parser": "^1.12.0", "buffer-equal-constant-time": "^1.0.1", - "coffee-script": "~1.10.0", "docker-delta": "0.0.11", "docker-progress": "^2.1.0", "docker-toolbelt": "^1.0.0", @@ -40,6 +40,7 @@ "node": "0.10.22" }, "devDependencies": { + "coffee-script": "~1.10.0", "resin-lint": "^1.3.1" } } From 762ff2b498819e3f777a48d265c9a91e876b7c2e Mon Sep 17 00:00:00 2001 From: Petros Angelatos Date: Wed, 6 Jul 2016 23:28:22 -0700 Subject: [PATCH 11/13] add changelog entries Signed-off-by: Petros Angelatos --- CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5834d9d0..ff3b6e06 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +* Compress go binary with upx [petrosagg] +* Switch to go version 1.6 [petrosagg] +* Print all logs to stdout of container instead of file [petrosagg] +* Upgrade nodejs to version 6.5 [petrosagg] +* Switch initsystem from supervisor to busybox init [petrosagg] +* Switch build to openembedded base images [petrosagg] * DRY up calls to gosuper API, and use empty Host header [Pablo] # v2.1.1 From 0546ba51d9de1e4dbea88275606a7a96103e58b6 Mon Sep 17 00:00:00 2001 From: Petros Angelatos Date: Fri, 9 Sep 2016 09:44:32 +0100 Subject: [PATCH 12/13] invoke the linter using npm --- Dockerfile.build.template | 3 ++- automation/jenkins_build.sh | 3 --- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/Dockerfile.build.template b/Dockerfile.build.template index 2425767f..3f293232 100644 --- a/Dockerfile.build.template +++ b/Dockerfile.build.template @@ -45,7 +45,8 @@ RUN JOBS=MAX npm install --unsafe-perm COPY src /usr/src/app/src -RUN npm run build +RUN npm run lint \ + && npm run build # Re-install just production modules. This should be fast due to npm cache from previous layer RUN rm -rf node_modules \ diff --git a/automation/jenkins_build.sh b/automation/jenkins_build.sh index 556d93e6..d0793697 100755 --- a/automation/jenkins_build.sh +++ b/automation/jenkins_build.sh @@ -16,9 +16,6 @@ MAKE_ARGS="ARCH=${ARCH} \ PUBNUB_PUBLISH_KEY=${PUBNUB_PUBLISH_KEY} \ MIXPANEL_TOKEN=${MIXPANEL_TOKEN}" -# Disabled until this is merged in npm https://github.com/npm/npm/pull/13257 -# make ${MAKE_ARGS} lint - make ${MAKE_ARGS} \ SUPERVISOR_VERSION=${ESCAPED_BRANCH_NAME} \ DEPLOY_REGISTRY= \ From edc7804de7c0847a3f54d2ea7e1092e0e5a823f8 Mon Sep 17 00:00:00 2001 From: Petros Angelatos Date: Tue, 13 Sep 2016 18:21:27 -0700 Subject: [PATCH 13/13] build: pin runtime image to specific date This will prevent the builds from failing if we update the base image Signed-off-by: Petros Angelatos --- Dockerfile.runtime.template | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile.runtime.template b/Dockerfile.runtime.template index 16e387bf..ea3b5600 100644 --- a/Dockerfile.runtime.template +++ b/Dockerfile.runtime.template @@ -1,5 +1,5 @@ # Minimal runtime image -FROM resin/%%ARCH%%-supervisor-base +FROM resin/%%ARCH%%-supervisor-base:20160913 WORKDIR /usr/src/app