Merge pull request #470 from afreydev/docker-build

Docker build
This commit is contained in:
Nick Sweeting 2020-09-12 23:10:04 -04:00 committed by GitHub
commit a6b9b04297
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -58,6 +58,15 @@ RUN curl -s https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add -
nodejs \
&& rm -rf /var/lib/apt/lists/*
# Install Node dependencies
WORKDIR "$NODE_DIR"
ENV PATH="${PATH}:$NODE_DIR/node_modules/.bin" \
npm_config_loglevel=error
RUN npm install -g npm
ADD ./package.json ./package.json
ADD ./package-lock.json ./package-lock.json
RUN npm ci
# Install Python dependencies
WORKDIR "$CODE_DIR"
ENV PATH="${PATH}:$VENV_PATH/bin"
@ -72,14 +81,6 @@ RUN apt-get update -qq \
&& apt-get autoremove -y \
&& rm -rf /var/lib/apt/lists/*
# Install Node dependencies
WORKDIR "$NODE_DIR"
ENV PATH="${PATH}:$NODE_DIR/node_modules/.bin" \
npm_config_loglevel=error
RUN npm install -g npm
ADD ./package.json ./package.json
RUN npm install
# Install ArchiveBox Python package
WORKDIR "$CODE_DIR"
ADD . "$CODE_DIR"