There is no need to run explicit mkdir, since the new directory is not used during the build and workdir command creates it automatically.
21 lines
417 B
Docker
21 lines
417 B
Docker
FROM node:12-alpine
|
|
|
|
# Hack to upgrade NPM:
|
|
# - install local version
|
|
# - replace old global verson with new one
|
|
|
|
RUN npm install npm@5.3 && \
|
|
rm -rf /usr/local/lib/node_modules/npm && \
|
|
mv /node_modules/npm /usr/local/lib/node_modules
|
|
|
|
RUN npm install -g xo@0.24.0
|
|
|
|
RUN npm install -g eslint-plugin-html@6.0.0
|
|
|
|
# Cleanup
|
|
RUN rm -fr /root/.npm /node_modules
|
|
|
|
WORKDIR /src
|
|
|
|
ENTRYPOINT ["/usr/local/bin/xo"]
|