summary refs log tree commit diff
path: root/Dockerfile
blob: 8fc870d20f34860e0deb7e1bfd45334e6b90fb2a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
FROM node:alpine

LABEL maintainer="https://github.com/pluralcafe/barkeep" \
      description="Ambassador bot forked from mbilokonsky/ambassador"

ENV UID=992
ENV GID=992

WORKDIR /barkeep

RUN echo "@edge https://uk.alpinelinux.org/alpine/edge/main" >> /etc/apk/repositories \
 && apk -U upgrade \
 && apk add -t build-dependencies \
    build-base \
    postgresql-dev \
 && apk add tini \
            ca-certificates \
            tzdata \
 && 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 --chown=barkeep:barkeep package.json index.js node-mastodon /barkeep/

RUN yarn install

USER barkeep

ENTRYPOINT ["/sbin/tini", "--"]
CMD ["yarn", "start"]