-
Notifications
You must be signed in to change notification settings - Fork 320
Add initial alpine variant #55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This uses the |
The outcome of nodejs/docker-node#289 might put a kink in that as well, though. 😞 |
Seems fine to me, but yes to waiting on the node user issue. |
I think nodejs/docker-node#299 is probably pretty firm confirmation on where the Node image maintainers stand. 😄 |
Wait, that's actually kind of conflicting. I'm confused now. |
Let me know if I can help to test this :) |
It's been long enough that I think it's really safe to say the Node.js maintainers are committed to keeping the I'm debating whether we should switch the |
Updated diff, for reference: diff --git a/alpine/Dockerfile b/debian/Dockerfile
index 6583678..eaf2ca8 100644
--- a/alpine/Dockerfile
+++ b/debian/Dockerfile
@@ -1,15 +1,20 @@
# http://support.ghost.org/supported-node-versions/
# https://github.com/nodejs/LTS
-FROM node:4-alpine
-
-# grab su-exec for easy step-down from root
-RUN apk add --no-cache 'su-exec>=0.2'
-
-RUN apk add --no-cache \
-# add "bash" for "[["
- bash \
-# add "tar" for "--one-file-system"
- tar
+FROM node:4-slim
+
+RUN groupadd user && useradd --create-home --home-dir /home/user -g user user
+
+# grab gosu for easy step-down from root
+ENV GOSU_VERSION 1.7
+RUN set -x \
+ && wget -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$(dpkg --print-architecture)" \
+ && wget -O /usr/local/bin/gosu.asc "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$(dpkg --print-architecture).asc" \
+ && export GNUPGHOME="$(mktemp -d)" \
+ && gpg --keyserver ha.pool.sks-keyservers.net --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4 \
+ && gpg --batch --verify /usr/local/bin/gosu.asc /usr/local/bin/gosu \
+ && rm -r "$GNUPGHOME" /usr/local/bin/gosu.asc \
+ && chmod +x /usr/local/bin/gosu \
+ && gosu nobody true
ENV GHOST_SOURCE /usr/src/ghost
WORKDIR $GHOST_SOURCE
@@ -18,21 +23,22 @@ ENV GHOST_VERSION 0.11.7
RUN set -ex; \
\
- apk add --no-cache --virtual .build-deps \
- ca-certificates \
+ buildDeps=' \
gcc \
make \
- openssl \
python \
unzip \
- ; \
+ '; \
+ apt-get update; \
+ apt-get install -y $buildDeps --no-install-recommends; \
+ rm -rf /var/lib/apt/lists/*; \
\
wget -O ghost.zip "https://github.com/TryGhost/Ghost/releases/download/${GHOST_VERSION}/Ghost-${GHOST_VERSION}.zip"; \
unzip ghost.zip; \
\
npm install --production; \
\
- apk del .build-deps; \
+ apt-get purge -y --auto-remove $buildDeps; \
\
rm ghost.zip; \
npm cache clean; \
@@ -40,7 +46,7 @@ RUN set -ex; \
ENV GHOST_CONTENT /var/lib/ghost
RUN mkdir -p "$GHOST_CONTENT" \
- && chown -R node:node "$GHOST_CONTENT" \
+ && chown -R user:user "$GHOST_CONTENT" \
# Ghost expects "config.js" to be in $GHOST_SOURCE, but it's more useful for
# image users to manage that as part of their $GHOST_CONTENT volume, so we
# symlink.
@@ -48,6 +54,7 @@ RUN mkdir -p "$GHOST_CONTENT" \
VOLUME $GHOST_CONTENT
COPY docker-entrypoint.sh /usr/local/bin/
+RUN ln -s usr/local/bin/docker-entrypoint.sh /entrypoint.sh # backwards compat
ENTRYPOINT ["docker-entrypoint.sh"]
EXPOSE 2368 |
- `drupal`: 8.3.0 (docker-library/drupal#78), remove 8.2 (docker-library/drupal#80) - `ghost`: add `alpine` variant (docker-library/ghost#55) - `mongo`: more edge cases (docker-library/mongo#167, docker-library/mongo#169) - `postgres`: adjust append (docker-library/postgres#270) - `rabbitmq`: add `vm_memory_high_watermark` support based on cgroup limits (docker-library/rabbitmq#105) - `rocket.chat`: 0.55.0-rc.1 - `wordpress`: add `wp-cli` variant (docker-library/wordpress#198)
Closes #46