-
Notifications
You must be signed in to change notification settings - Fork 4.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
added multiarch build #6577
added multiarch build #6577
Changes from all commits
0b64109
e644ecd
b4b2c10
8391103
ccb5315
607879c
ff29cae
15e6a6e
1dda186
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
client/.tmp/ | ||
client/dist/ | ||
node_modules/ | ||
viz-lib/node_modules/ | ||
.tmp/ | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,3 @@ | ||
FROM node:16.20.1-bookworm as frontend-builder | ||
|
||
RUN npm install --global --force yarn@1.22.19 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could you explain the changes you're making to the Dockerfile here? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Removed frontend build from Dockerfile as there are to many places, where same node dependencies are installed. Also there's no sense to build same platform independent frontend in many places |
||
|
||
# Controls whether to build the frontend assets | ||
ARG skip_frontend_build | ||
|
||
ENV CYPRESS_INSTALL_BINARY=0 | ||
ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=1 | ||
|
||
RUN useradd -m -d /frontend redash | ||
USER redash | ||
|
||
WORKDIR /frontend | ||
COPY --chown=redash package.json yarn.lock .yarnrc /frontend/ | ||
COPY --chown=redash viz-lib /frontend/viz-lib | ||
|
||
# Controls whether to instrument code for coverage information | ||
ARG code_coverage | ||
ENV BABEL_ENV=${code_coverage:+test} | ||
|
||
RUN if [ "x$skip_frontend_build" = "x" ] ; then yarn --frozen-lockfile --network-concurrency 1; fi | ||
|
||
COPY --chown=redash client /frontend/client | ||
COPY --chown=redash webpack.config.js /frontend/ | ||
RUN if [ "x$skip_frontend_build" = "x" ] ; then yarn build; else mkdir -p /frontend/client/dist && touch /frontend/client/dist/multi_org.html && touch /frontend/client/dist/index.html; fi | ||
|
||
FROM python:3.8-slim-bookworm | ||
|
||
EXPOSE 5000 | ||
|
@@ -62,15 +35,16 @@ RUN apt-get update && \ | |
|
||
|
||
ARG TARGETPLATFORM | ||
ARG databricks_odbc_driver_url=https://databricks-bi-artifacts.s3.us-east-2.amazonaws.com/simbaspark-drivers/odbc/2.6.26/SimbaSparkODBC-2.6.26.1045-Debian-64bit.zip | ||
RUN if [ "$TARGETPLATFORM" = "linux/amd64" ]; then \ | ||
eradman marked this conversation as resolved.
Show resolved
Hide resolved
|
||
ARG DATABRICKS_ODBC_DRIVER_URL=https://databricks-bi-artifacts.s3.us-east-2.amazonaws.com/simbaspark-drivers/odbc/2.7.5/SimbaSparkODBC-2.7.5.1012-Debian-64bit.zip | ||
RUN \ | ||
if [ "$TARGETPLATFORM" = "linux/amd64" ]; then \ | ||
curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor -o /usr/share/keyrings/microsoft-prod.gpg \ | ||
&& curl https://packages.microsoft.com/config/debian/12/prod.list > /etc/apt/sources.list.d/mssql-release.list \ | ||
&& apt-get update \ | ||
&& ACCEPT_EULA=Y apt-get install -y --no-install-recommends msodbcsql17 \ | ||
&& ACCEPT_EULA=Y apt-get install -y --no-install-recommends msodbcsql18 \ | ||
&& apt-get clean \ | ||
&& rm -rf /var/lib/apt/lists/* \ | ||
&& curl "$databricks_odbc_driver_url" --location --output /tmp/simba_odbc.zip \ | ||
&& curl "$DATABRICKS_ODBC_DRIVER_URL" --location --output /tmp/simba_odbc.zip \ | ||
eradman marked this conversation as resolved.
Show resolved
Hide resolved
|
||
&& chmod 600 /tmp/simba_odbc.zip \ | ||
&& unzip /tmp/simba_odbc.zip -d /tmp/simba \ | ||
&& dpkg -i /tmp/simba/*.deb \ | ||
|
@@ -94,7 +68,6 @@ ARG install_groups="main,all_ds,dev" | |
RUN /etc/poetry/bin/poetry install --only $install_groups $POETRY_OPTIONS | ||
|
||
COPY --chown=redash . /app | ||
COPY --from=frontend-builder --chown=redash /frontend/client/dist /app/client/dist | ||
RUN chown redash /app | ||
USER redash | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not 100% clear where this
frontend
gets used in the build. Would you mind explaining? Does this also get pushed to Dockerhub as part of thepreview
image?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@guidopetri frontend is added to docker image during a build for each target arch and then first pushed to redash/preview and then copied from redash/preview to redash/redash
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How do we build this locally, then?
docker build -t redash_test .
seems to not build the frontend