Skip to content

Commit

Permalink
Switch to MULTI FROM Dockerfile and use Node 10 for builds (#3199)
Browse files Browse the repository at this point in the history
  • Loading branch information
koooge authored and arikfr committed Dec 23, 2018
1 parent 8ed8727 commit 64783b7
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
FROM node:10 as frontend-builder

WORKDIR /frontend
COPY package.json package-lock.json /frontend/
RUN npm install

COPY . /frontend
RUN npm run build

FROM redash/base:latest

# Controls whether to install extra dependencies needed for all data sources.
Expand All @@ -9,10 +18,10 @@ COPY requirements.txt requirements_dev.txt requirements_all_ds.txt ./
RUN pip install -r requirements.txt -r requirements_dev.txt
RUN if [ "x$skip_ds_deps" = "x" ] ; then pip install -r requirements_all_ds.txt ; else echo "Skipping pip install -r requirements_all_ds.txt" ; fi

COPY . ./
RUN npm install && npm run bundle && npm run build && rm -rf node_modules
COPY . /app
COPY --from=frontend-builder /frontend/client/dist /app/client/dist
RUN chown -R redash /app
USER redash

ENTRYPOINT ["/app/bin/docker-entrypoint"]
CMD ["server"]
CMD ["server"]

0 comments on commit 64783b7

Please sign in to comment.