diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index 5b871b62319..59477d94b7f 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -13,30 +13,39 @@ jobs: steps: - name: Check out the repo uses: actions/checkout@v6 - + + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - name: Set output id: vars - run: echo ::set-output name=tag::${GITHUB_REF#refs/*/} - + run: echo "tag=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT + - name: Check output env: RELEASE_VERSION: ${{ steps.vars.outputs.tag }} run: | echo $RELEASE_VERSION echo ${{ steps.vars.outputs.tag }} - + - name: Log in to Docker Hub - uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef + uses: docker/login-action@v3 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - + - name: Build and push Docker image - uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 + uses: docker/build-push-action@v5 with: context: . + platforms: linux/amd64,linux/arm64 push: true - tags: countly/countly-server:latest,countly/countly-server:${{ steps.vars.outputs.tag }} + tags: ${{ secrets.DOCKERHUB_USERNAME }}/countly-server:latest,${{ secrets.DOCKERHUB_USERNAME }}/countly-server:${{ steps.vars.outputs.tag }} + cache-from: type=gha + cache-to: type=gha,mode=max push_api: name: Push Countly API Image @@ -44,30 +53,40 @@ jobs: steps: - name: Check out the repo uses: actions/checkout@v6 - + + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - name: Set output id: vars - run: echo ::set-output name=tag::${GITHUB_REF#refs/*/} - + run: echo "tag=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT + - name: Check output env: RELEASE_VERSION: ${{ steps.vars.outputs.tag }} run: | echo $RELEASE_VERSION echo ${{ steps.vars.outputs.tag }} - + - name: Log in to Docker Hub - uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef + uses: docker/login-action@v3 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - + - name: Build and push Docker image - uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 + uses: docker/build-push-action@v5 with: - push: true + context: . file: ./Dockerfile-api - tags: countly/api:latest,countly/api:${{ steps.vars.outputs.tag }} + platforms: linux/amd64,linux/arm64 + push: true + tags: ${{ secrets.DOCKERHUB_USERNAME }}/api:latest,${{ secrets.DOCKERHUB_USERNAME }}/api:${{ steps.vars.outputs.tag }} + cache-from: type=gha + cache-to: type=gha,mode=max push_frontend: name: Push Countly Frontend Image @@ -75,30 +94,40 @@ jobs: steps: - name: Check out the repo uses: actions/checkout@v6 - + + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - name: Set output id: vars - run: echo ::set-output name=tag::${GITHUB_REF#refs/*/} - + run: echo "tag=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT + - name: Check output env: RELEASE_VERSION: ${{ steps.vars.outputs.tag }} run: | echo $RELEASE_VERSION echo ${{ steps.vars.outputs.tag }} - + - name: Log in to Docker Hub - uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef + uses: docker/login-action@v3 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - + - name: Build and push Docker image - uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 + uses: docker/build-push-action@v5 with: - push: true + context: . file: ./Dockerfile-frontend - tags: countly/frontend:latest,countly/frontend:${{ steps.vars.outputs.tag }} + platforms: linux/amd64,linux/arm64 + push: true + tags: ${{ secrets.DOCKERHUB_USERNAME }}/frontend:latest,${{ secrets.DOCKERHUB_USERNAME }}/frontend:${{ steps.vars.outputs.tag }} + cache-from: type=gha + cache-to: type=gha,mode=max push_all: name: Push Countly Single-All Image @@ -106,27 +135,37 @@ jobs: steps: - name: Check out the repo uses: actions/checkout@v6 - + + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - name: Set output id: vars - run: echo ::set-output name=tag::${GITHUB_REF#refs/*/} - + run: echo "tag=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT + - name: Check output env: RELEASE_VERSION: ${{ steps.vars.outputs.tag }} run: | echo $RELEASE_VERSION echo ${{ steps.vars.outputs.tag }} - + - name: Log in to Docker Hub - uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef + uses: docker/login-action@v3 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - + - name: Build and push Docker image - uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 + uses: docker/build-push-action@v5 with: - push: true + context: . file: ./Dockerfile-core - tags: countly/countly-core:latest,countly/countly-core:${{ steps.vars.outputs.tag }},countly/countly-core:pipelines-${{ github.base_ref || github.ref_name }} + platforms: linux/amd64,linux/arm64 + push: true + tags: ${{ secrets.DOCKERHUB_USERNAME }}/countly-core:latest,${{ secrets.DOCKERHUB_USERNAME }}/countly-core:${{ steps.vars.outputs.tag }},${{ secrets.DOCKERHUB_USERNAME }}/countly-core:pipelines-${{ github.base_ref || github.ref_name }} + cache-from: type=gha + cache-to: type=gha,mode=max diff --git a/Dockerfile b/Dockerfile index 43df0776347..42974569764 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM phusion/baseimage:focal-1.2.0 +FROM phusion/baseimage:jammy-1.0.4 ARG COUNTLY_PLUGINS=mobile,web,desktop,plugins,density,locale,browser,sources,views,logger,systemlogs,populator,reports,crashes,push,star-rating,slipping-away-users,compare,server-stats,dbviewer,times-of-day,compliance-hub,alerts,onboarding,consolidate,remote-config,hooks,dashboards,sdk,data-manager,guides # Countly Enterprise: diff --git a/Dockerfile-api b/Dockerfile-api index a5dfa82d30e..9f80f935dda 100644 --- a/Dockerfile-api +++ b/Dockerfile-api @@ -22,7 +22,6 @@ ENV COUNTLY_CONTAINER="api" \ COUNTLY_CONFIG_API_API_WORKERS="1" \ COUNTLY_CONFIG_API_API_HOST="0.0.0.0" \ NODE_OPTIONS="--max-old-space-size=2048" \ - TINI_VERSION="0.18.0"\ PUPPETEER_CACHE_DIR=/opt/countly/.cache/puppeteer WORKDIR /opt/countly @@ -34,22 +33,11 @@ RUN apt-get update && \ RUN apt-get update && \ apt-get upgrade -y && \ - cd /usr/src && \ - wget https://www.python.org/ftp/python/3.8.20/Python-3.8.20.tar.xz && \ - tar -xf Python-3.8.20.tar.xz && \ - apt-get install -y build-essential sudo zlib1g-dev libssl3 libncurses5-dev libgdbm-dev libnss3-dev libssl-dev libsqlite3-dev libreadline-dev libffi-dev curl libbz2-dev && \ - cd Python-3.8.20 && \ - ./configure --enable-optimizations --enable-shared && \ - make && \ - make altinstall && \ - ldconfig /usr/src/Python-3.8.20 && \ - ln -sf /usr/local/bin/python3.8 /usr/bin/python3 + apt-get install -y python3 python3-pip python3-dev build-essential sudo -RUN curl -s -L -o /tmp/tini.deb "https://github.com/krallin/tini/releases/download/v${TINI_VERSION}/tini_${TINI_VERSION}.deb" && \ - dpkg -i /tmp/tini.deb && \ +RUN apt-get update && apt-get install -y tini sqlite3 && \ \ # modify standard distribution - apt-get update && apt-get install -y sqlite3 && \ ./bin/docker/modify.sh && \ \ # preinstall @@ -60,16 +48,14 @@ RUN curl -s -L -o /tmp/tini.deb "https://github.com/krallin/tini/releases/downlo HOME=/tmp npm install argon2 --build-from-source --unsafe-perm=true --allow-root && \ ./bin/docker/preinstall.sh && \ bash /opt/countly/bin/scripts/detect.init.sh && \ - python3.8 -m pip install --upgrade pip setuptools && \ \ # cleanup & chown npm remove -y --no-save mocha nyc should supertest && \ - apt-get purge -y python3 python3-pip python3-distutils python3-setuptools && \ apt-get remove -y git gcc g++ make automake autoconf libtool pkg-config unzip sqlite3 wget && \ apt-get install -y libgbm-dev libgbm1 gconf-service libasound2 libatk1.0-0 libatk-bridge2.0-0 libc6 libcairo2 libcups2 libdbus-1-3 libexpat1 libfontconfig1 libgcc1 libgconf-2-4 libgdk-pixbuf2.0-0 libglib2.0-0 libgtk-3-0 libnspr4 libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6 ca-certificates fonts-liberation libappindicator1 libnss3 lsb-release xdg-utils && \ apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* && \ apt-get autoremove -y && \ - rm -rf test /tmp/* /tmp/.??* /var/tmp/* /var/tmp/.??* /var/log/* /root/.npm /usr/local/lib/python3.8/ensurepip/_bundled/*.whl /usr/src/Python* /var/lib/dpkg/info/python3* && \ + rm -rf test /tmp/* /tmp/.??* /var/tmp/* /var/tmp/.??* /var/log/* /root/.npm && \ \ # temporary to remove npm bug message mkdir /.npm && chown -R 1001:0 /.npm && \ diff --git a/Dockerfile-centos-api b/Dockerfile-centos-api deleted file mode 100644 index 0352a049c9c..00000000000 --- a/Dockerfile-centos-api +++ /dev/null @@ -1,82 +0,0 @@ -FROM centos:8 - -ARG COUNTLY_PLUGINS=mobile,web,desktop,plugins,density,locale,browser,sources,views,logger,systemlogs,populator,reports,crashes,push,star-rating,slipping-away-users,compare,server-stats,dbviewer,times-of-day,compliance-hub,alerts,onboarding,consolidate,remote-config,hooks,dashboards,sdk,data-manager,guides -# Countly Enterprise: -#ARG COUNTLY_PLUGINS=mobile,web,desktop,plugins,density,locale,browser,sources,views,license,drill,funnels,retention_segments,flows,cohorts,surveys,remote-config,ab-testing,formulas,activity-map,concurrent_users,revenue,logger,systemlogs,populator,reports,crashes,push,geo,block,users,star-rating,slipping-away-users,compare,server-stats,dbviewer,crash_symbolication,crashes-jira,groups,white-labeling,alerts,times-of-day,compliance-hub,onboarding,active_users,performance-monitoring,config-transfer,consolidate,data-manager,hooks,dashboards,heatmaps,sdk,guides,journey_engine,content - -ARG GEOIP=empty -EXPOSE 3001 -HEALTHCHECK --start-period=400s CMD bash -c '\ - if [ "$COUNTLY_CONFIG_API_API_SSL_ENABLED" = "true" ] || [ "$COUNTLY_CONFIG_API_API_SSL_ENABLED" = "\"true\"" ]; then \ - curl -k --fail https://localhost:3001/o/ping || exit 1; \ - else \ - curl --fail http://localhost:3001/o/ping || exit 1; \ - fi' - -USER root - -# Core dependencies -## Tini -ENV COUNTLY_CONTAINER="api" \ - COUNTLY_DEFAULT_PLUGINS="${COUNTLY_PLUGINS}" \ - COUNTLY_CONFIG_API_API_WORKERS="1" \ - COUNTLY_CONFIG_API_API_HOST="0.0.0.0" \ - NODE_OPTIONS="--max-old-space-size=2048" \ - TINI_VERSION="0.18.0" \ - PATH="/opt/rh/rh-nodejs10/root/usr/bin:${PATH}" - -WORKDIR /opt/countly -COPY . . - -# fix 'appstream' repo for CentOS 8 -RUN cd /etc/yum.repos.d/ -RUN sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-* -RUN sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-* -RUN dnf update -y libmodulemd - -RUN yum update -y - -RUN curl -s -L -o /tmp/tini.rpm "https://github.com/krallin/tini/releases/download/v${TINI_VERSION}/tini_${TINI_VERSION}.rpm" && \ - rpm -i /tmp/tini.rpm && \ - \ - curl -sL https://rpm.nodesource.com/setup_20.x | bash - && \ - yum install -y nodejs python3.8 python2 python38-libs python38-devel python38-pip nss libdrm libgbm cyrus-sasl* && \ - ln -s /usr/bin/node /usr/bin/nodejs && \ - unlink /usr/bin/python3 && \ - ln -s /usr/bin/python3.8 /usr/bin/python3 && \ - ln -s /usr/bin/python2.7 /usr/bin/python && \ - \ - yum install -y python3-policycoreutils && \ - yum group install -y "Development Tools" && \ - yum install -y epel-release && \ - yum install -y pango.x86_64 libXcomposite.x86_64 libXcursor.x86_64 libXdamage.x86_64 libXext.x86_64 libXi.x86_64 libXtst.x86_64 cups-libs.x86_64 libXScrnSaver.x86_64 libXrandr.x86_64 GConf2.x86_64 alsa-lib.x86_64 atk.x86_64 gtk3.x86_64 xorg-x11-fonts-100dpi xorg-x11-fonts-75dpi xorg-x11-utils xorg-x11-fonts-cyrillic xorg-x11-fonts-Type1 xorg-x11-fonts-misc && \ - yum install -y https://pkgs.sysadmins.ws/el8/base/x86_64/raven-release-1.0-2.el8.noarch.rpm && \ - yum install -y wget openssl-devel make git libsqlite* sqlite unzip bzip2 && \ - # modify standard distribution - ./bin/docker/modify.sh && \ - \ - # preinstall - cp -n ./api/config.sample.js ./api/config.js && \ - cp -n ./frontend/express/config.sample.js ./frontend/express/config.js && \ - HOME=/tmp npm install -g npm@latest && \ - HOME=/tmp npm install --unsafe-perm=true --allow-root && \ - HOME=/tmp npm install argon2 --build-from-source --unsafe-perm=true --allow-root && \ - ./bin/docker/preinstall.sh && \ - bash /opt/countly/bin/scripts/detect.init.sh && \ - \ - # cleanup & chown - npm remove -y --no-save mocha nyc should supertest && \ - rm -rf /opt/app-root/src/.npm && \ - yum remove -y git wget unzip make && \ - yum --setopt=groupremove_leaf_only=1 groupremove -y 'Development Tools' && \ - yum clean all && \ - rm -rf test /tmp/* /tmp/.??* /var/tmp/* /var/tmp/.??* /var/log/* && \ - chown -R 1001:0 /opt/countly && \ - chmod -R g=u /opt/countly - - -USER 1001:0 - -ENTRYPOINT ["/usr/bin/tini", "-v", "--"] - -CMD ["/opt/countly/bin/docker/cmd.sh"] diff --git a/Dockerfile-centos-frontend b/Dockerfile-centos-frontend deleted file mode 100644 index 06ff48a1c79..00000000000 --- a/Dockerfile-centos-frontend +++ /dev/null @@ -1,85 +0,0 @@ -FROM centos:8 - -ARG COUNTLY_PLUGINS=mobile,web,desktop,plugins,density,locale,browser,sources,views,logger,systemlogs,populator,reports,crashes,push,star-rating,slipping-away-users,compare,server-stats,dbviewer,times-of-day,compliance-hub,alerts,onboarding,consolidate,remote-config,hooks,dashboards,sdk,data-manager,guides -# Countly Enterprise: -#ARG COUNTLY_PLUGINS=mobile,web,desktop,plugins,density,locale,browser,sources,views,license,drill,funnels,retention_segments,flows,cohorts,surveys,remote-config,ab-testing,formulas,activity-map,concurrent_users,revenue,logger,systemlogs,populator,reports,crashes,push,geo,block,users,star-rating,slipping-away-users,compare,server-stats,dbviewer,crash_symbolication,crashes-jira,groups,white-labeling,alerts,times-of-day,compliance-hub,onboarding,active_users,performance-monitoring,config-transfer,consolidate,data-manager,hooks,dashboards,heatmaps,sdk,guides,journey_engine,content - -EXPOSE 6001 -HEALTHCHECK --start-period=400s CMD bash -c '\ - if [ "$COUNTLY_CONFIG_FRONTEND_WEB_SSL_ENABLED" = "true" ] || [ "$COUNTLY_CONFIG_FRONTEND_WEB_SSL_ENABLED" = "\"true\"" ]; then \ - curl -k --fail https://localhost:6001/ping || exit 1; \ - else \ - curl --fail http://localhost:6001/ping || exit 1; \ - fi' - -USER root - -# Core dependencies -## Tini -ENV COUNTLY_CONTAINER="frontend" \ - COUNTLY_DEFAULT_PLUGINS="${COUNTLY_PLUGINS}" \ - COUNTLY_CONFIG_FRONTEND_WEB_HOST="0.0.0.0" \ - NODE_OPTIONS="--max-old-space-size=2048" \ - TINI_VERSION="0.18.0" \ - PATH="/opt/rh/rh-nodejs10/root/usr/bin:${PATH}" - -WORKDIR /opt/countly -COPY . . - -# fix 'appstream' repo for CentOS 8 -RUN cd /etc/yum.repos.d/ -RUN sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-* -RUN sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-* -RUN dnf update -y libmodulemd - -RUN yum update -y - -RUN curl -s -L -o /tmp/tini.rpm "https://github.com/krallin/tini/releases/download/v${TINI_VERSION}/tini_${TINI_VERSION}.rpm" && \ - rpm -i /tmp/tini.rpm && \ - \ - curl -sL https://rpm.nodesource.com/setup_20.x | bash - && \ - yum install -y nodejs python3.8 python2 python38-libs python38-devel python38-pip nss libdrm libgbm cyrus-sasl* && \ - ln -s /usr/bin/node /usr/bin/nodejs && \ - unlink /usr/bin/python3 && \ - ln -s /usr/bin/python3.8 /usr/bin/python3 && \ - ln -s /usr/bin/python2.7 /usr/bin/python && \ - \ - yum install -y python3-policycoreutils && \ - yum group install -y "Development Tools" && \ - yum install -y epel-release && \ - yum install -y pango.x86_64 libXcomposite.x86_64 libXcursor.x86_64 libXdamage.x86_64 libXext.x86_64 libXi.x86_64 libXtst.x86_64 cups-libs.x86_64 libXScrnSaver.x86_64 libXrandr.x86_64 GConf2.x86_64 alsa-lib.x86_64 atk.x86_64 gtk3.x86_64 xorg-x11-fonts-100dpi xorg-x11-fonts-75dpi xorg-x11-utils xorg-x11-fonts-cyrillic xorg-x11-fonts-Type1 xorg-x11-fonts-misc && \ - yum install -y https://pkgs.sysadmins.ws/el8/base/x86_64/raven-release-1.0-2.el8.noarch.rpm && \ - yum install -y wget openssl-devel make git sqlite libsqlite* unzip bzip2 && \ - # modify standard distribution - ./bin/docker/modify.sh && \ - \ - # preinstall - cp -n ./frontend/express/public/javascripts/countly/countly.config.sample.js ./frontend/express/public/javascripts/countly/countly.config.js && \ - cp -n ./frontend/express/config.sample.js ./frontend/express/config.js && \ - cp -n ./api/config.sample.js ./api/config.js && \ - HOME=/tmp npm install -g npm@latest && \ - HOME=/tmp npm install --unsafe-perm=true --allow-root && \ - HOME=/tmp npm install argon2 --build-from-source --unsafe-perm=true --allow-root && \ - ./bin/docker/preinstall.sh && \ - bash /opt/countly/bin/scripts/detect.init.sh && \ - countly update sdk-web && \ - \ - # cleanup & chown - npm remove -y --no-save mocha nyc should supertest puppeteer && \ - rm -rf /opt/app-root/src/.npm && \ - yum remove -y git wget unzip make && \ - yum --setopt=groupremove_leaf_only=1 groupremove -y 'Development Tools' && \ - yum clean all && \ - rm -rf test /tmp/* /tmp/.??* /var/tmp/* /var/tmp/.??* /var/log/* && \ - chown -R 1001:0 /opt/countly && \ - chmod -R g=u /opt/countly && \ - \ - bash ./bin/scripts/detect.init.sh && \ - ./bin/commands/countly.sh update sdk-web - - -USER 1001:0 - -ENTRYPOINT ["/usr/bin/tini", "-v", "--"] - -CMD ["/opt/countly/bin/docker/cmd.sh"] diff --git a/Dockerfile-core b/Dockerfile-core index b3a807d8b5c..954517ea412 100644 --- a/Dockerfile-core +++ b/Dockerfile-core @@ -1,4 +1,4 @@ -FROM phusion/baseimage:focal-1.2.0 +FROM phusion/baseimage:jammy-1.0.4 ARG COUNTLY_PLUGINS=mobile,web,desktop,plugins,density,locale,browser,sources,views,logger,systemlogs,populator,reports,crashes,push,star-rating,slipping-away-users,compare,server-stats,dbviewer,times-of-day,compliance-hub,alerts,onboarding,consolidate,remote-config,hooks,dashboards,sdk,data-manager,guides # Countly Enterprise: @@ -38,12 +38,12 @@ RUN useradd -r -M -U -d /opt/countly -s /bin/false countly && \ libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6 ca-certificates fonts-liberation libappindicator1 libnss3 lsb-release xdg-utils \ # push / nghttp2 gcc g++ make binutils autoconf automake autotools-dev libtool pkg-config zlib1g-dev libcunit1-dev libssl-dev libxml2-dev libev-dev \ - libevent-dev libjansson-dev libjemalloc-dev cython python3-dev python-setuptools && \ + libevent-dev libjansson-dev libjemalloc-dev cython3 python3-dev python3-setuptools && \ # node wget -qO- https://deb.nodesource.com/setup_20.x | bash - && \ # data_migration (mongo clients) wget -qO - https://www.mongodb.org/static/pgp/server-6.0.asc | sudo apt-key add - && \ - echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/6.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-6.0.list && \ + echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu jammy/mongodb-org/6.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-6.0.list && \ apt-get update && \ apt-get install -y nodejs mongodb-mongosh mongodb-org-tools && \ \ @@ -77,7 +77,7 @@ RUN useradd -r -M -U -d /opt/countly -s /bin/false countly && \ # cleanup npm remove -y --no-save mocha nyc should supertest && \ apt-get remove -y build-essential libkrb5-dev sqlite3 wget \ - gcc g++ make binutils autoconf automake autotools-dev libtool pkg-config zlib1g-dev libcunit1-dev libssl-dev libxml2-dev libev-dev libevent-dev libjansson-dev libjemalloc-dev cython python3-dev python-setuptools && \ + gcc g++ make binutils autoconf automake autotools-dev libtool pkg-config zlib1g-dev libcunit1-dev libssl-dev libxml2-dev libev-dev libevent-dev libjansson-dev libjemalloc-dev cython3 python3-dev python3-setuptools && \ apt-get install -y gconf-service libasound2 libatk1.0-0 libc6 libcairo2 libcups2 libdbus-1-3 libexpat1 libfontconfig1 libgcc1 libgconf-2-4 libgdk-pixbuf2.0-0 libglib2.0-0 libgtk-3-0 libnspr4 libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6 ca-certificates fonts-liberation libappindicator1 libnss3 lsb-release xdg-utils && \ apt-get clean && \ rm -rf /var/lib/apt/lists/* /tmp/* /tmp/.??* /var/tmp/* /var/tmp/.??* ~/.npm ~/.cache && \ diff --git a/Dockerfile-frontend b/Dockerfile-frontend index 063cea69afe..3f57e75474f 100644 --- a/Dockerfile-frontend +++ b/Dockerfile-frontend @@ -19,8 +19,7 @@ USER root ENV COUNTLY_CONTAINER="frontend" \ COUNTLY_DEFAULT_PLUGINS="${COUNTLY_PLUGINS}" \ COUNTLY_CONFIG_FRONTEND_WEB_HOST="0.0.0.0" \ - NODE_OPTIONS="--max-old-space-size=2048" \ - TINI_VERSION="0.18.0" + NODE_OPTIONS="--max-old-space-size=2048" WORKDIR /opt/countly COPY . . @@ -31,22 +30,11 @@ RUN apt-get update && \ RUN apt-get update && \ apt-get upgrade -y && \ - cd /usr/src && \ - wget https://www.python.org/ftp/python/3.8.20/Python-3.8.20.tar.xz && \ - tar -xf Python-3.8.20.tar.xz && \ - apt-get install -y build-essential sudo zlib1g-dev libssl3 libncurses5-dev libgdbm-dev libnss3-dev libssl-dev libsqlite3-dev libreadline-dev libffi-dev curl libbz2-dev && \ - cd Python-3.8.20 && \ - ./configure --enable-optimizations --enable-shared && \ - make && \ - make altinstall && \ - ldconfig /usr/src/Python-3.8.20 && \ - ln -sf /usr/local/bin/python3.8 /usr/bin/python3 + apt-get install -y python3 python3-pip python3-dev build-essential sudo -RUN curl -s -L -o /tmp/tini.deb "https://github.com/krallin/tini/releases/download/v${TINI_VERSION}/tini_${TINI_VERSION}.deb" && \ - dpkg -i /tmp/tini.deb && \ +RUN apt-get update && apt-get install -y tini sqlite3 && \ \ # modify standard distribution - apt-get update && apt-get install -y sqlite3 && \ ./bin/docker/modify.sh && \ \ # preinstall @@ -58,17 +46,15 @@ RUN curl -s -L -o /tmp/tini.deb "https://github.com/krallin/tini/releases/downlo HOME=/tmp npm install argon2 --build-from-source --unsafe-perm=true --allow-root && \ ./bin/docker/preinstall.sh && \ bash /opt/countly/bin/scripts/detect.init.sh && \ - python3.8 -m pip install --upgrade pip setuptools && \ - countly update sdk-web && \ + countly update sdk-web && \ \ # cleanup & chown npm remove -y --no-save mocha nyc should supertest puppeteer && \ - apt-get purge -y python3 python3-pip python3-distutils python3-setuptools && \ apt-get remove -y git gcc g++ make automake autoconf libtool pkg-config unzip sqlite3 wget && \ apt-get autoremove -y && \ apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* && \ apt-get autoremove -y && \ - rm -rf test /tmp/* /tmp/.??* /var/tmp/* /var/tmp/.??* /var/log/* /root/.npm /usr/local/lib/python3.8/ensurepip/_bundled/*.whl /usr/src/Python* /var/lib/dpkg/info/python3* && \ + rm -rf test /tmp/* /tmp/.??* /var/tmp/* /var/tmp/.??* /var/log/* /root/.npm && \ \ # temporary to remove npm bug message mkdir /.npm && chown -R 1001:0 /.npm && \ diff --git a/README.md b/README.md index cc396dbb435..4afabcfbf59 100644 --- a/README.md +++ b/README.md @@ -84,6 +84,8 @@ Countly can collect and visualize data from mobile, web and desktop applications Countly installation script assumes it is running on a fresh Ubuntu/CentOS/RHEL Linux without any services listening on port 80 or 443 (which should also be open to incoming traffic), and takes care of every library and software required to be installed for Countly to run. +:warning: **Note**: CentOS-based Docker images have been deprecated as CentOS 8 reached end-of-life. Please use the Ubuntu-based images instead. + There are several ways to install Countly: 1. The following command will download and install Countly on your **Ubuntu** or **CentOS** server. @@ -94,6 +96,18 @@ There are several ways to install Countly: 3. Countly Lite also has Docker support - [see our official Docker repository](https://registry.hub.docker.com/r/countly/countly-server/) and [installation instructions for Docker](https://support.countly.com/hc/en-us/articles/360036862332-Installing-the-Countly-Server). +### 🐳 Docker Multi-Architecture Support + +Countly Docker images now support both **x86_64 (amd64)** and **ARM64 (aarch64)** architectures: + +* ✅ **AWS Graviton** instances +* ✅ **Apple Silicon** (M1/M2/M3) Macs +* ✅ **ARM-based** cloud servers and edge devices + +Docker will automatically pull the correct image for your platform. All official images (`countly/api`, `countly/frontend`, `countly/countly-core`, `countly/countly-server`) are multi-architecture. + +**Migration from CentOS images**: If you were using `Dockerfile-centos-api` or `Dockerfile-centos-frontend`, please migrate to the Debian-based `Dockerfile-api` and `Dockerfile-frontend`. These are faster, receive regular updates, and support ARM64. + If you want to upgrade Countly from a previous version, please take a look at [upgrading documentation](https://support.countly.com/hc/en-us/articles/360037443652-Upgrading-the-Countly-Server). ## 🧩 API, extensibility and plugins