Skip to content

Instantly share code, notes, and snippets.

@hendrikhofstadt
Last active May 26, 2018 05:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hendrikhofstadt/f96105fd4a130b15fd301c4315956fcf to your computer and use it in GitHub Desktop.
Save hendrikhofstadt/f96105fd4a130b15fd301c4315956fcf to your computer and use it in GitHub Desktop.
Lisk alpine Dockerfile
FROM node:6-alpine AS builder
RUN apk add --no-cache python curl automake autoconf libtool git alpine-sdk
COPY . /home/lisk/lisk/
WORKDIR /home/lisk/lisk
RUN npm install --quiet --production --unsafe-perm
# Build actual container
FROM node:6-alpine
ARG version
ARG minVersion
RUN addgroup lisk -g 1100 && \
adduser -D -u 1100 lisk -G lisk
RUN echo http://nl.alpinelinux.org/alpine/edge/testing >> /etc/apk/repositories && \
apk add --no-cache confd bash
COPY --from=builder --chown=lisk:lisk /home/lisk/lisk /home/lisk/lisk
COPY --chown=lisk:lisk docker_files/ /
USER lisk
# git repository needed for build; cannot added to .dockerignore
RUN rm -rf /home/lisk/lisk/.git && \
mkdir /home/lisk/lisk/logs
ARG LISK_VERSION
ARG LISK_MIN_VERSION=">=${LISK_VERSION}"
ENV LISK_VERSION ${LISK_VERSION}
ENV LISK_MIN_VERSION ${LISK_MIN_VERSION}
ENV LISK_API_ACCESS_WHITELIST_1=127.0.0.1
ENV LISK_FORGING_ACCESS_WHITELIST_1=${LISK_API_ACCESS_WHITELIST_1}
WORKDIR /home/lisk/lisk
CMD ["/home/lisk/run.sh"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment