Skip to content

Commit 1841968

Browse files
committed
Install NPM deps in Dockerfile
1 parent f7d6f5d commit 1841968

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

.dockerignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
datameta/static/node_modules

Dockerfile

+5-2
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ FROM continuumio/miniconda3:4.9.2-alpine
2222

2323
ENV PATH /opt/conda/bin/conda:$PATH
2424

25-
# Install psql client for pre-launch check
26-
RUN apk add postgresql-client
25+
# Install psql client for pre-launch check and npm for frontend deps
26+
RUN apk add postgresql-client npm
2727

2828
# Install requirements that would otherwise build from source or take long to install via conda
2929
RUN conda install -c conda-forge gettext pylibmc psycopg2 pandas'=1.2.2' && conda clean --all
@@ -37,6 +37,9 @@ COPY LICENSE.txt /tmp/datameta.src/LICENSE.txt
3737
COPY MANIFEST.in /tmp/datameta.src/MANIFEST.in
3838
COPY docker/launcher /usr/local/bin
3939

40+
# Install frontend deps
41+
RUN npm install --prefix /tmp/datameta.src/datameta/static/
42+
4043
# Create a user to run datameta
4144
RUN adduser --disabled-password --home /var/datameta datameta
4245
RUN chown -R datameta /tmp/datameta.src

0 commit comments

Comments
 (0)