├── keys └── trust.gpg ├── .gitignore ├── LICENSE ├── Dockerfile └── README.md /keys/trust.gpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/harningt/docker-base-alpine-s6-overlay/HEAD/keys/trust.gpg -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Vim files 2 | [._]*.s[a-w][a-z] 3 | [._]s[a-w][a-z] 4 | *.un~ 5 | Session.vim 6 | .netrwhist 7 | *~ 8 | # Temporary directory for work 9 | .tmp 10 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015 Thomas Harning Jr 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 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | # VERSION latest 2 | # AUTHOR: Thomas Harning Jr 3 | # DESCRIPTION: Alpine linux base image with s6-overlay injected 4 | 5 | FROM alpine:edge 6 | MAINTAINER Thomas Harning Jr 7 | 8 | ENV S6_OVERLAY_RELEASE v3.1.2.1 9 | ENV TMP_BUILD_DIR /tmp/build 10 | 11 | # Pull in the overlay script binaries 12 | ADD https://github.com/just-containers/s6-overlay/releases/download/${S6_OVERLAY_RELEASE}/s6-overlay-noarch.tar.xz ${TMP_BUILD_DIR}/ 13 | ADD https://github.com/just-containers/s6-overlay/releases/download/${S6_OVERLAY_RELEASE}/s6-overlay-noarch.tar.xz.sha256 ${TMP_BUILD_DIR}/ 14 | 15 | # Pull in the overlay architecture-specific binaries 16 | ADD https://github.com/just-containers/s6-overlay/releases/download/${S6_OVERLAY_RELEASE}/s6-overlay-x86_64.tar.xz ${TMP_BUILD_DIR}/ 17 | ADD https://github.com/just-containers/s6-overlay/releases/download/${S6_OVERLAY_RELEASE}/s6-overlay-x86_64.tar.xz.sha256 ${TMP_BUILD_DIR}/ 18 | 19 | # Perform an apk upgrade, too to make sure all security updates are applied 20 | # - do not anticipate compatibility issues at this small layer 21 | RUN apk update && apk upgrade && \ 22 | cd ${TMP_BUILD_DIR} && \ 23 | sha256sum -c *.sha256 && \ 24 | tar -C / -Jxpf s6-overlay-noarch.tar.xz && \ 25 | tar -C / -Jxpf s6-overlay-x86_64.tar.xz && \ 26 | cd / && \ 27 | rm -rf /var/cache/apk/* && \ 28 | rm -rf ${TMP_BUILD_DIR} 29 | 30 | ENTRYPOINT [ "/init" ] 31 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # docker-base-alpine-s6-overlay 2 | Base docker image including the s6-overlay but using Alpine's official base. 3 | 4 | See the original [s6-overlay project](https://github.com/just-containers/s6-overlay) 5 | for more details. 6 | 7 | # Updating 8 | 9 | To synchronize the source tree with s6-overlay, update the S6\_OVERLAY\_RELEASE item 10 | inside the Dockerfile. 11 | 12 | # Notes 13 | 14 | Previously the included copy of s6 was from Alpine, but the overlay 15 | has gotten to the point where version incompatibilities are frequent enough 16 | to be annoying. The benefit of using Alpine's s6 are probably irrelevant now. 17 | 18 | Also there is no gnupg key for the overlay binaries - so that mechanism has been dropped. 19 | 20 | # Quickstart 21 | 22 | Build the following Dockerfile and try this guy out: 23 | 24 | ``` 25 | FROM harningt/base-alpine-s6-overlay:edge 26 | RUN apk add --update nginx && \ 27 | rm -rf /var/cache/apk/* && \ 28 | echo "daemon off;" >> /etc/nginx/nginx.conf 29 | ENTRYPOINT ["/init"] 30 | CMD ["nginx"] 31 | ``` 32 | 33 | ``` 34 | docker-host $ docker build -t demo . 35 | docker-host $ docker run --name s6demo -d -p 80:80 demo 36 | docker-host $ docker top s6demo acxf 37 | PID TTY STAT TIME COMMAND 38 | 3788 ? Ss 0:00 \_ s6-svscan 39 | 3827 ? S 0:00 | \_ foreground 40 | 3834 ? S 0:00 | | \_ foreground 41 | 3879 ? S 0:00 | | \_ nginx 42 | 3880 ? S 0:00 | | \_ nginx 43 | 3881 ? S 0:00 | | \_ nginx 44 | 3882 ? S 0:00 | | \_ nginx 45 | 3883 ? S 0:00 | | \_ nginx 46 | 3828 ? S 0:00 | \_ s6-supervise 47 | 3829 ? S 0:00 | \_ s6-supervise 48 | 3830 ? Ss 0:00 | \_ s6-log 49 | docker-host $ curl --head http://127.0.0.1/ 50 | HTTP/1.1 200 OK 51 | Server: nginx/1.4.6 (Ubuntu) 52 | Date: Thu, 26 Mar 2015 14:57:34 GMT 53 | Content-Type: text/html 54 | Content-Length: 612 55 | Last-Modified: Tue, 04 Mar 2014 11:46:45 GMT 56 | Connection: keep-alive 57 | ETag: "5315bd25-264" 58 | Accept-Ranges: bytes 59 | ``` 60 | --------------------------------------------------------------------------------