From 0faa4665bc3ccafea80c42d4e50d36ff1d5f1b0c Mon Sep 17 00:00:00 2001 From: pluralcafe-docker Date: Mon, 20 Aug 2018 01:57:43 +0000 Subject: Fix non-root ping issues --- Dockerfile | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index fc27a06..c15f942 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM node:slim +FROM node:alpine LABEL maintainer="https://github.com/pluralcafe/barkeep" \ description="Ambassador bot forked from mbilokonsky/ambassador" @@ -8,13 +8,20 @@ ENV GID=992 WORKDIR /barkeep -RUN addgroup --gid ${GID} barkeep \ - && adduser --home /barkeep --shell /bin/sh --disabled-login --ingroup barkeep --uid ${UID} barkeep +RUN echo "@edge https://dl-cdn.alpinelinux.org/alpine/edge/main" >> /etc/apk/repositories \ + && apk -U upgrade \ + && apk add -t build-dependencies \ + build-base \ + postgresql-dev \ + && apk add tini \ + && update-ca-certificates \ + && rm -rf /tmp/* /var/cache/apk/* \ + && addgroup -g ${GID} barkeep \ + && adduser -h /barkeep -s /bin/sh -D -G barkeep -u ${UID} barkeep -COPY package.json index.js yarn.lock /barkeep/ +COPY --chown=barkeep:barkeep package.json index.js yarn.lock /barkeep/ -RUN yarn install \ - && chown -R barkeep:barkeep /barkeep +RUN yarn install USER barkeep -- cgit