2018-06-01 02:08:46 +02:00
|
|
|
## Base Image
|
|
|
|
## Using the smallest container available
|
|
|
|
## https://hub.docker.com/_/node/
|
|
|
|
# 8.11.2-alpine, 8.11-alpine, 8-alpine, carbon-alpine (8/alpine/Dockerfile)
|
2018-06-01 22:21:16 +02:00
|
|
|
FROM node:8-alpine
|
2018-10-14 14:30:06 +02:00
|
|
|
LABEL MAINTAINER="chamunks [at] gmail [dot] com"
|
2018-06-01 02:08:46 +02:00
|
|
|
|
2018-06-01 22:21:16 +02:00
|
|
|
## Install base packages and clone repo to src directory.
|
2018-06-05 19:55:28 +02:00
|
|
|
RUN apk update && apk --no-cache add git curl wget python build-base bash && \
|
2018-06-03 02:06:44 +02:00
|
|
|
npm update && npm i npm@latest -g && \
|
2018-06-05 19:55:28 +02:00
|
|
|
npm install -g node-gyp && \
|
|
|
|
adduser speech -h /app/ -s /bin/bash -D && \
|
2018-06-01 02:08:46 +02:00
|
|
|
chown -Rv speech /app && \
|
2018-10-02 22:55:58 +02:00
|
|
|
git clone https://github.com/lbryio/spee.ch.git /usr/local/src/spee.ch/ && \
|
|
|
|
cd /usr/local/src/spee.ch/ && \
|
2018-06-03 02:06:44 +02:00
|
|
|
npm install
|
2018-06-01 02:08:46 +02:00
|
|
|
|
2018-10-07 02:26:53 +02:00
|
|
|
RUN wget -quiet -O /usr/bin/debugpaste https://github.com/nixc-us/debugpaste-it/raw/master/bin/debugpaste_64 && \
|
|
|
|
chmod +x /usr/bin/debugpaste
|
|
|
|
|
2018-06-01 22:21:16 +02:00
|
|
|
## Install container support files
|
2018-06-05 18:27:51 +02:00
|
|
|
RUN curl -s https://raw.githubusercontent.com/chamunks/docker-support/master/install | /bin/sh
|
2018-10-14 14:30:06 +02:00
|
|
|
COPY docker-entrypoint.sh /usr/local/bin/docker-entrypoint
|
|
|
|
COPY healthcheck.sh /usr/local/bin/healthcheck
|
|
|
|
COPY debugpaste-it.sh /usr/local/bin/debugpaste-it
|
2018-10-07 02:26:53 +02:00
|
|
|
|
2018-06-01 02:08:46 +02:00
|
|
|
|
2018-06-01 22:44:39 +02:00
|
|
|
HEALTHCHECK CMD healthcheck
|
2018-06-01 22:21:16 +02:00
|
|
|
EXPOSE 3000
|
2018-06-01 02:08:46 +02:00
|
|
|
USER speech
|
|
|
|
WORKDIR /app/
|
|
|
|
ENTRYPOINT ["docker-entrypoint"]
|
|
|
|
CMD ["npm", "run", "start:dev"]
|