forked from mbilokonsky/ambassador
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
34 lines (24 loc) · 885 Bytes
/
Dockerfile
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
32
33
34
FROM alpine:latest
LABEL maintainer="https://github.com/mbilokonsky/ambassador" \
description="A mastodon bot for showing the world the best your instance has to offer."
ENV UID=992 GID=992
WORKDIR /ambassador
RUN echo "@edge https://nl.alpinelinux.org/alpine/edge/main" >> /etc/apk/repositories \
&& apk -U upgrade \
&& apk add -t build-dependencies \
build-base \
postgresql-dev \
&& apk add \
libuv@edge \
nodejs-npm@edge \
nodejs@edge \
tini \
&& npm install -g npm@3 && npm install -g yarn \
&& update-ca-certificates \
&& rm -rf /tmp/* /var/cache/apk/*
COPY package.json yarn.lock /ambassador/
RUN yarn
RUN addgroup -g ${GID} ambassador && adduser -h /ambassador -s /bin/sh -D -G ambassador -u ${UID} ambassador && chown -R ambassador:ambassador /ambassador
USER ambassador
COPY index.js /ambassador/
ENTRYPOINT ["/sbin/tini", "--"]