├── .drone.sec ├── .drone.yml ├── Dockerfile ├── LICENSE ├── README.md └── docker-entrypoint.sh /.drone.sec: -------------------------------------------------------------------------------- 1 | eyJhbGciOiJSU0EtT0FFUCIsImVuYyI6IkExMjhHQ00ifQ.AILpZWIrRW_PmDAT1Wb8JccMMYPyeXn-sIF6Hl6y_ZjlqXsPPoUxh8n7YmvCT-VYwFcTUNjHcRRtygOO8JuzdALA0nrnbMbg0V5_VMA8otwl07zOsCh7ub_U3YCFeb9s3ebFsogwpfKZdpyDkHSFPwwlUN1nZdqug64bppgU_HKnTYoIZqRsqmJRcbZ2MjFKoGLDO0sUBvkNFk1LbNu3NdH66-GZVfAn3WtgxT1LoP_cygrA1njUSI7gK2GOB2Apsj0ASHE92Mfp1FlanEOB3uLKCi3ZH2aiy5c-BbQ54lTkfAcIi2S6ShxNbW2J24aS986S5rX5Zw40UtNmeSDQdg.MQvQDBGT3dIvV7yT.UEsAksztH336ogGjLIZE1mQlplyiwOXnb10PezonXdCapH-lqzwx1OAS0yc7-a9_wyjQFTO1KXJpGu63_Ch_fvG--eFS9Hb_TCIAy6oNRJUwYmaHdKSL66arqvOW1pVJ244qehLWgf0S8piGnw-Owljxl0Hzui0TKfILFjq20hTyYISFMEw3g6Md0rsbOjrymtdhQ5PESNMkzG79dCGEgTac53-UgH4nA-wUi9jFqyATcu2S6gBo9s9mSAlTKtU_xe-g4v41U-z_5sw_7t3J6d7pEQ80zLREg857ZL4KTofwTuGbdf-RYmM6vFalShqzHNlGIDXKtEJ2jsriDmMrSELMBqq-w0XkJCeYe4_hSZaWmer6K3sWb0CbM-Y-YKpvaq1NSpKNbwoXcHbLEewwztse8wUbHsOlnP6Qe_luJDJuefA-Z14mOwXpxcYBFVXCuIvtGA-h0yUPEF2-SMecigx2vw3NvegaNgtGSxyOnt2bAUhtphp5xzJbAGGyEwRou7_4PPOJn98kcd2AUFrCa3Paiy9Xv3HCf6sZ0r_0XsnS40WwzSg_X6_byof7VLpjD1pMndUBLbD5oT8KHnBh6Tab664ppA5-rnuLX3FQC2JckdLvHyEAMCD-S-SUJUFu8r27Jwr_n7qL9FXvl9wtpnAtS-9hpISEOLrJ6k1gxbTA3dHQUlr2BSFJOa8n6c0G-4_6uZg.bmbs5NVONq-c9BVht4RQkw -------------------------------------------------------------------------------- /.drone.yml: -------------------------------------------------------------------------------- 1 | #debug: true 2 | 3 | publish: 4 | docker: 5 | # environment: 6 | # - DOCKER_LAUNCH_DEBUG=true 7 | username: $$DOCKER_USER 8 | password: $$DOCKER_PASS 9 | email: $$DOCKER_EMAIL 10 | repo: hypriot/rpi-redis 11 | tag: 12 | - latest 13 | - "3.0.4" 14 | 15 | notify: 16 | slack: 17 | webhook_url: $$SLACK_WEBHOOK_URL 18 | channel: buildstatus 19 | username: Drone 20 | when: 21 | started: false 22 | success: true 23 | failure: true 24 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | # Pull base image 2 | FROM resin/rpi-raspbian:wheezy 3 | MAINTAINER Govinda Fichtner 4 | 5 | # add our user and group first to make sure their IDs get assigned consistently, regardless of whatever dependencies get added 6 | RUN groupadd -r redis && useradd -r -g redis redis 7 | 8 | RUN apt-get update \ 9 | && apt-get install -y curl \ 10 | && rm -rf /var/lib/apt/lists/* 11 | 12 | # grab gosu for easy step-down from root 13 | RUN gpg --keyserver pool.sks-keyservers.net --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4 14 | RUN curl -o /usr/local/bin/gosu -SL "https://github.com/tianon/gosu/releases/download/1.2/gosu-$(dpkg --print-architecture)" \ 15 | && curl -o /usr/local/bin/gosu.asc -SL "https://github.com/tianon/gosu/releases/download/1.2/gosu-$(dpkg --print-architecture).asc" \ 16 | && gpg --verify /usr/local/bin/gosu.asc \ 17 | && rm /usr/local/bin/gosu.asc \ 18 | && chmod +x /usr/local/bin/gosu 19 | 20 | ENV REDIS_VERSION 3.0.4 21 | ENV REDIS_DOWNLOAD_URL http://download.redis.io/releases/redis-3.0.0.tar.gz 22 | ENV REDIS_DOWNLOAD_SHA1 c75fd32900187a7c9f9d07c412ea3b3315691c65 23 | 24 | # for redis-sentinel see: http://redis.io/topics/sentinel 25 | RUN buildDeps='gcc libc6-dev make'; \ 26 | set -x \ 27 | && apt-get update && apt-get install -y $buildDeps --no-install-recommends \ 28 | && rm -rf /var/lib/apt/lists/* \ 29 | && mkdir -p /usr/src/redis \ 30 | && curl -sSL "$REDIS_DOWNLOAD_URL" -o redis.tar.gz \ 31 | && echo "$REDIS_DOWNLOAD_SHA1 *redis.tar.gz" | sha1sum -c - \ 32 | && tar -xzf redis.tar.gz -C /usr/src/redis --strip-components=1 \ 33 | && rm redis.tar.gz \ 34 | && make -C /usr/src/redis \ 35 | && make -C /usr/src/redis install \ 36 | && rm -r /usr/src/redis \ 37 | && apt-get purge -y --auto-remove $buildDeps 38 | 39 | RUN mkdir /data && chown redis:redis /data 40 | VOLUME /data 41 | WORKDIR /data 42 | 43 | COPY docker-entrypoint.sh /entrypoint.sh 44 | ENTRYPOINT ["/entrypoint.sh"] 45 | 46 | EXPOSE 6379 47 | CMD [ "redis-server" ] 48 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015 Hypriot 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | 23 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # rpi-redis 2 | 3 | Raspberry Pi compatible Docker base image with [Redis](http://redis.io/). 4 | 5 | ## What is Redis? 6 | 7 | ![logo](https://raw.githubusercontent.com/docker-library/docs/master/redis/logo.png) 8 | 9 | Redis is an open-source, networked, in-memory, key-value data store with optional durability. It is written in ANSI C. The development of Redis has been sponsored by Pivotal since May 2013; before that, it was sponsored by VMware. According to the monthly ranking by DB-Engines.com, Redis is the most popular key-value store. The name Redis means REmote DIctionary Server. 10 | ## Build Details 11 | - [Source Project Page](https://github.com/hypriot) 12 | - [Source Repository](https://github.com/hypriot/rpi-redis) 13 | - [Dockerfile](https://github.com/hypriot/rpi-redis/blob/master/Dockerfile) 14 | - [DockerHub] (https://registry.hub.docker.com/u/hypriot/rpi-redis/) 15 | 16 | ## Build the Docker Image 17 | Run all the commands from within the project root directory. 18 | 19 | ```bash 20 | make build 21 | ``` 22 | 23 | ### Run the Docker Image and get the version of the installed Redis 24 | ```bash 25 | make version 26 | ``` 27 | 28 | ### Push the Docker Image to the Docker Hub 29 | * First use a `docker login` with username, password and email address 30 | * Second push the Docker Image to the official Docker Hub 31 | 32 | ```bash 33 | make push 34 | ``` 35 | 36 | ## How to use this image 37 | 38 | Todo: Need to add some description 39 | 40 | ## License 41 | 42 | The MIT License (MIT) 43 | 44 | Copyright (c) 2015 Hypriot 45 | 46 | Permission is hereby granted, free of charge, to any person obtaining a copy 47 | of this software and associated documentation files (the "Software"), to deal 48 | in the Software without restriction, including without limitation the rights 49 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 50 | copies of the Software, and to permit persons to whom the Software is 51 | furnished to do so, subject to the following conditions: 52 | 53 | The above copyright notice and this permission notice shall be included in all 54 | copies or substantial portions of the Software. 55 | 56 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 57 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 58 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 59 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 60 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 61 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 62 | SOFTWARE. 63 | -------------------------------------------------------------------------------- /docker-entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | 4 | if [ "$1" = 'redis-server' ]; then 5 | chown -R redis . 6 | exec gosu redis "$@" 7 | fi 8 | 9 | exec "$@" 10 | --------------------------------------------------------------------------------