Last active
August 20, 2019 00:16
-
-
Save mreferre/1c03f63e82f096ff112ebfad0af475ea to your computer and use it in GitHub Desktop.
Dockerfile (from alpine) for building a Greengrass 1.7 image for ARMv7
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM alpine | |
MAINTAINER [email protected] | |
# Set ENV_VAR for Greengrass RC to be untarred inside Docker Image | |
ARG greengrass_release | |
ENV GREENGRASS_RELEASE=${greengrass_release} | |
# This Dockerfile builds a GG image for the ARMv7 platform | |
# curl this file: https://d1onfpft10uf5o.cloudfront.net/greengrass-core/downloads/1.7.0/aws-greengrass-docker-1.7.0.tar.gz | |
# untar it | |
# move into the directory | |
# curl this file: https://d1onfpft10uf5o.cloudfront.net/greengrass-core/downloads/1.7.0/greengrass-linux-armv7l-1.7.0.tar.gz | |
# replace the Dockerfile in the directory with this Dockerfile | |
# run this command: docker build -t gg-armv7:1.7 --build-arg "greengrass_release=greengrass-linux-armv7l-1.7.0.tar.gz" . | |
# follow the steps documented here: https://docs.aws.amazon.com/greengrass/latest/developerguide/run-gg-in-docker-container.html | |
# Install Greengrass Core Dependencies | |
RUN apk add xz openjdk8 bash nodejs | |
# Copy Greengrass Licenses AWS IoT Greengrass Docker Image | |
COPY greengrass-license-v1.pdf / | |
# Create ggc_user and ggc_group | |
RUN adduser -S ggc_user | |
RUN addgroup -S ggc_group | |
# Copy/Untar Greengrass RC inside Docker Image | |
COPY $greengrass_release / | |
RUN tar xzf /$GREENGRASS_RELEASE -C / | |
RUN rm /$GREENGRASS_RELEASE | |
# Copy start-up script | |
COPY "greengrass-entrypoint.sh" / | |
# Expose 8883 to pub/sub MQTT messages | |
EXPOSE 8883 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment