mujohiddin opened a new issue, #34577:
URL: https://github.com/apache/superset/issues/34577
### Bug description
######################################################################
# 1 Base lean superset-frontend build image
######################################################################
FROM --platform=${BUILDPLATFORM:-amd64} node:18-bullseye-slim AS
superset-node
ARG NPM_BUILD_CMD="build"
RUN apt-get update -qq \
&& apt-get install -yqq --no-install-recommends \
build-essential \
python3 \
zstd \
&& rm -rf /var/lib/apt/lists/*
ENV BUILD_CMD=${NPM_BUILD_CMD}
WORKDIR /app/superset-frontend
COPY superset-frontend/package.json superset-frontend/package-lock.json ./
RUN npm ci
COPY superset-frontend .
RUN npm run ${BUILD_CMD}
COPY superset/translations /app/superset/translations
RUN npm run build-translation \
&& rm /app/superset/translations/*/LC_MESSAGES/*.po \
&& rm /app/superset/translations/messages.pot
######################################################################
# 2?? Base lean Superset image
######################################################################
FROM apache/superset:4.1.2 as lean
ENV GECKODRIVER_VERSION=v0.33.0 \
FIREFOX_VERSION=117.0.1 \
ORACLE_CLIENT_VERSION=21.12.0.0.0dbru \
ORACLE_CLIENT_FOLDER=instantclient_21_12
USER root
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
libnss3 \
libdbus-glib-1-2 \
libgtk-3-0 \
libx11-xcb1 \
libasound2 \
libxtst6 \
wget tar \
libldap2-dev \
pkg-config \
build-essential \
curl \
default-libmysqlclient-dev \
libsasl2-dev \
libsasl2-modules-gssapi-mit \
libpq-dev \
libecpg-dev \
libldap2-dev \
&& touch superset/static/version_info.json \
&& chown -R superset:superset ./* \
&& rm -rf /var/lib/apt/lists/*
# ? Oracle Instant Client
RUN apt-get update \
&& apt-get install -y --no-install-recommends unzip libaio1 \
&& apt-get autoremove -yqq --purge \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* \
&& mkdir -pv /opt/oracle \
&& chown -R "superset:root" /opt/oracle \
&& cd /opt/oracle \
&& curl -Lf
"https://download.oracle.com/otn_software/linux/instantclient/2112000/instantclient-basic-linux.x64-21.12.0.0.0dbru.zip"
\
--output oracle-instantclient-${ORACLE_CLIENT_VERSION}.zip \
&& unzip -o ./oracle-instantclient-${ORACLE_CLIENT_VERSION}.zip -d
/opt/oracle \
&& rm -f ./oracle-instantclient-${ORACLE_CLIENT_VERSION}.zip \
&& echo "/opt/oracle/${ORACLE_CLIENT_FOLDER}" >
/etc/ld.so.conf.d/oracle-instantclient.conf \
&& ldconfig
# ? Copy app source scripts included
COPY --chown=superset:superset . /app
# Frontendda build qilingan statik fayllarni nusxalash
COPY --chown=superset:superset --from=superset-node
/app/superset-frontend/dist /app/superset/static/assets
COPY --chown=superset:superset --from=superset-node
/app/superset/translations /app/superset/translations
# ? Install Python deps
RUN pip install python-ldap openpyxl cx_Oracle preset-cli SQLAlchemy==1.4.52
clickhouse-driver clickhouse-connect psycopg2
RUN ./scripts/translations/generate_mo_files.sh \
&& chown -R superset:superset superset/translations \
&& rm superset/translations/messages.pot \
&& rm superset/translations/*/LC_MESSAGES/*.po
# ? Make sure all .sh are executable
# Use --chmod during COPY for predictable permissions
COPY --chown=superset:superset --chmod=755 docker/ /app/docker/
USER superset
HEALTHCHECK CMD curl -f "http://localhost:${SUPERSET_PORT}/health"
EXPOSE ${SUPERSET_PORT}
CMD ["/app/docker/run-server.sh"]
######################################################################
# 3?? Dev stage re-copy scripts with same permissions
######################################################################
FROM lean AS dev
USER root
RUN chown -R "superset:root" /app/docker
# ? Re-copy with chmod
COPY --chown=superset:superset --chmod=755 docker/ /app/docker/
RUN apt-get update && \
apt-get install -y --no-install-recommends \
git curl build-essential libnss3 libdbus-glib-1-2 libgtk-3-0 \
libx11-xcb1 libasound2 libxtst6 && \
rm -rf /var/lib/apt/lists/*
COPY requirements/development.txt requirements/
RUN --mount=type=cache,target=/root/.cache/pip \
pip install -r requirements/development.txt
RUN chown -R "superset:root" /app/docker
RUN pip install thrift
USER superset
RUN chown -R "superset:root" /app/docker
RUN pip install thrift
######################################################################
# 4?? CI stage
######################################################################
FROM lean AS ci
# ? Again: always copy with chmod for CI too
COPY --chown=superset:superset --chmod=755 docker/ /app/docker/
USER superset
### Screenshots/recordings
Hi, I have a superset project loaded into Docker. I use it by modifying the
frontend part on a regular server and building it. All the changes are coming
out, but when I push the deployed image to Nexus and start K8S, the changes
made for the frontend are not coming out. I don't understand if I'm missing
something or if I need to do something extra when deploying the images via
Nexus Helm.
npm can't even build the Dockerfile itself
### Superset version
master / latest-dev
### Python version
3.9
### Node version
16
### Browser
Chrome
### Additional context
_No response_
### Checklist
- [ ] I have searched Superset docs and Slack and didn't find a solution to
my problem.
- [ ] I have searched the GitHub issue tracker and didn't find a similar bug
report.
- [ ] I have checked Superset's logs for errors and if I found a relevant
Python stacktrace, I included it here as text in the "additional context"
section.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]