Skip to content
Snippets Groups Projects
  • Cam Saul's avatar
    3c980639
    Build script overhaul 2023 (#28767) · 3c980639
    Cam Saul authored
    * Build Script overhaul
    
    * Remove stray deps.edn
    
    * Include :ci profile for build and release tests
    
    * Fix release script
    
    * Update markdown dox
    
    * Update another dox
    
    * Tweakz
    
    * Don't pin new version of data.xml to core project, just for build scripts
    
    * Ignore unrecognized options
    
    * Fix i18n/enumerate
    Build script overhaul 2023 (#28767)
    Cam Saul authored
    * Build Script overhaul
    
    * Remove stray deps.edn
    
    * Include :ci profile for build and release tests
    
    * Fix release script
    
    * Update markdown dox
    
    * Update another dox
    
    * Tweakz
    
    * Don't pin new version of data.xml to core project, just for build scripts
    
    * Ignore unrecognized options
    
    * Fix i18n/enumerate
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
Dockerfile 1.98 KiB
###################
# STAGE 1: builder
###################

FROM node:16-slim as builder

ARG MB_EDITION=oss

WORKDIR /home/node

RUN apt-get update && apt-get upgrade -y && apt-get install openjdk-11-jdk curl git -y \
    && curl -O https://download.clojure.org/install/linux-install-1.11.1.1208.sh \
    && chmod +x linux-install-1.11.1.1208.sh \
    && ./linux-install-1.11.1.1208.sh

COPY . .
RUN INTERACTIVE=false CI=true MB_EDITION=$MB_EDITION bin/build.sh

# ###################
# # STAGE 2: runner
# ###################

## Remember that this runner image needs to be the same as bin/docker/Dockerfile with the exception that this one grabs the
## jar from the previous stage rather than the local build
## we're not yet there to provide an ARM runner till https://github.com/adoptium/adoptium/issues/96 is ready

FROM --platform=linux/amd64 eclipse-temurin:11-jre-alpine as runner

ENV FC_LANG en-US LC_CTYPE en_US.UTF-8

# dependencies
RUN apk add -U bash ttf-dejavu fontconfig curl java-cacerts && \
    apk upgrade && \
    rm -rf /var/cache/apk/* && \
    mkdir -p /app/certs && \
    curl https://s3.amazonaws.com/rds-downloads/rds-combined-ca-bundle.pem -o /app/certs/rds-combined-ca-bundle.pem  && \
    /opt/java/openjdk/bin/keytool -noprompt -import -trustcacerts -alias aws-rds -file /app/certs/rds-combined-ca-bundle.pem -keystore /etc/ssl/certs/java/cacerts -keypass changeit -storepass changeit && \
    curl https://cacerts.digicert.com/DigiCertGlobalRootG2.crt.pem -o /app/certs/DigiCertGlobalRootG2.crt.pem  && \
    /opt/java/openjdk/bin/keytool -noprompt -import -trustcacerts -alias azure-cert -file /app/certs/DigiCertGlobalRootG2.crt.pem -keystore /etc/ssl/certs/java/cacerts -keypass changeit -storepass changeit && \
    mkdir -p /plugins && chmod a+rwx /plugins

# add Metabase script and uberjar
COPY --from=builder /home/node/target/uberjar/metabase.jar /app/
COPY bin/docker/run_metabase.sh /app/

# expose our default runtime port
EXPOSE 3000

# run it
ENTRYPOINT ["/app/run_metabase.sh"]