25 lines
604 B
Docker
25 lines
604 B
Docker
FROM node:12-alpine
|
|
|
|
RUN mkdir /code
|
|
WORKDIR /code
|
|
|
|
RUN apk add curl gzip \
|
|
--virtual .build-dependencies
|
|
|
|
# Install and cache dependencies
|
|
RUN curl -L -o elm.gz https://github.com/elm/compiler/releases/download/0.19.1/binary-for-linux-64-bit.gz && \
|
|
gunzip elm.gz && \
|
|
chmod +x elm && \
|
|
mv elm /usr/local/bin/
|
|
|
|
COPY package*.json /code/
|
|
|
|
# Install elm-analyse, elm linter, and elm test
|
|
RUN npm install
|
|
ENV PATH=$PATH:/code/node_modules/elm-linter/bin:/code/node_modules/elm-format/bin:/code/node_modules/elm-test/bin
|
|
|
|
# Add remainder of files
|
|
COPY . .
|
|
|
|
ENTRYPOINT ["/usr/local/bin/npm"]
|