Last active
December 8, 2018 21:12
-
-
Save mreferre/eab620b87888c91723c80621c9ac4ef5 to your computer and use it in GitHub Desktop.
Dockerfile (from centos) 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 centos | |
MAINTAINER [email protected] | |
# This Dockerfile builds a GG image for the ARM64 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 | |
# Set ENV_VAR for Greengrass RC to be untarred inside Docker Image | |
ARG greengrass_release | |
ENV GREENGRASS_RELEASE=${greengrass_release} | |
# Install Greengrass Core Dependencies | |
RUN yum update -y && \ | |
yum install -y shadow-utils tar gzip xz wget java-1.8.0 && \ | |
wget https://nodejs.org/dist/v6.10.2/node-v6.10.2-linux-armv7l.tar.xz && \ | |
tar xf node-v6.10.2-linux-armv7l.tar.xz && \ | |
cp node-v6.10.2-linux-armv7l/bin/node /usr/bin/node && \ | |
ln -s /usr/bin/node /usr/bin/nodejs6.10 && \ | |
rm -rf node-v6.10.2-linux-armv7l.tar.xz node-v6.10.2-linux-armv7l && \ | |
yum remove -y wget | |
# Copy Greengrass Licenses AWS IoT Greengrass Docker Image | |
COPY greengrass-license-v1.pdf / | |
# Create ggc_user and ggc_group | |
RUN useradd -r ggc_user | |
RUN groupadd -r 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