Skip to content
Commits on Source (37)
...@@ -2,56 +2,53 @@ variables: ...@@ -2,56 +2,53 @@ variables:
GIT_SUBMODULE_STRATEGY: recursive GIT_SUBMODULE_STRATEGY: recursive
DOCKER_HUB_REPO: libresh/discourse DOCKER_HUB_REPO: libresh/discourse
test-beta: .compute_version: &compute_version
tags: - if [ "$CHANNEL" == "stable" ]; then export FILTER="grep -v beta"; else export FILTER="grep beta"; fi
- build - export DISCOURSE_VERSION=`wget -qO- https://api.github.com/repos/discourse/discourse/tags | grep name | cut -d'"' -f4 | $FILTER | head -n1`
- export DATE=`date "+%Y-%m-%dT%H-%M-%SZ"`
.test:
image: image:
name: gcr.io/kaniko-project/executor:debug name: gcr.io/kaniko-project/executor:debug
entrypoint: [""] entrypoint: [""]
variables:
DESTINATION: "--no-push"
script: script:
- export DISCOURSE_VERSION=`wget -qO- https://api.github.com/repos/discourse/discourse/tags | grep name | cut -d'"' -f4 | grep beta | head -n1` - *compute_version
- /kaniko/executor --context . --no-push --build-arg DISCOURSE_VERSION=$DISCOURSE_VERSION - export DISCOURSE_MAJOR=`echo $DISCOURSE_VERSION | cut -d"." -f1-3`
- echo $DISCOURSE_MAJOR
- echo $DISCOURSE_VERSION
- /kaniko/executor --single-snapshot --context . ${DESTINATION} --build-arg DISCOURSE_VERSION=$DISCOURSE_VERSION
except: except:
- master - master
test-beta:
extends: .test
variables:
CHANNEL: "beta"
test-stable: test-stable:
tags: extends: .test
- build variables:
image: CHANNEL: "stable"
name: gcr.io/kaniko-project/executor:debug
entrypoint: [""]
script:
- export DISCOURSE_VERSION=`wget -qO- https://api.github.com/repos/discourse/discourse/tags | grep name | cut -d'"' -f4 | grep -v beta | head -n1`
- /kaniko/executor --context . --no-push --build-arg DISCOURSE_VERSION=$DISCOURSE_VERSION
except:
- master
build-beta: .push:
tags: extends: .test
- build before_script:
image: - *compute_version
name: gcr.io/kaniko-project/executor:debug
entrypoint: [""]
script:
- cp $DOCKER_SECRET_CONFIG /kaniko/.docker/config.json - cp $DOCKER_SECRET_CONFIG /kaniko/.docker/config.json
- export DISCOURSE_VERSION=`wget -qO- https://api.github.com/repos/discourse/discourse/tags | grep name | cut -d'"' -f4 | grep beta | head -n1` - export DESTINATION="--destination ${DOCKER_HUB_REPO}:${DISCOURSE_VERSION}-${DATE} --destination ${DOCKER_HUB_REPO}:${DISCOURSE_VERSION} --destination ${DOCKER_HUB_REPO}:${DISCOURSE_MAJOR} --destination ${DOCKER_HUB_REPO}:${CHANNEL}"
- export DISCOURSE_MAJOR=`echo $DISCOURSE_VERSION | cut -d"." -f1-3` except: []
- export DESTINATION="--destination ${DOCKER_HUB_REPO}:${DISCOURSE_VERSION} --destination ${DOCKER_HUB_REPO}:${DISCOURSE_MAJOR} --destination ${DOCKER_HUB_REPO}:beta"
- /kaniko/executor --context . ${DESTINATION} --build-arg DISCOURSE_VERSION=$DISCOURSE_VERSION
only: only:
- master - master
build-stable: # bug: the CHANNEL variable is not passed to the Dockerfile.
tags: push-beta:
- build extends: .push
image: variables:
name: gcr.io/kaniko-project/executor:debug CHANNEL: "beta"
entrypoint: [""]
script: #push-stable:
- cp $DOCKER_SECRET_CONFIG /kaniko/.docker/config.json # extends: .push
- export DISCOURSE_VERSION=`wget -qO- https://api.github.com/repos/discourse/discourse/tags | grep name | cut -d'"' -f4 | grep -v beta | head -n1` # variables:
- export DISCOURSE_MAJOR=`echo $DISCOURSE_VERSION | cut -d"." -f1-2` # CHANNEL: "stable"
- export DESTINATION="--destination ${DOCKER_HUB_REPO}:${DISCOURSE_VERSION} --destination ${DOCKER_HUB_REPO}:${DISCOURSE_MAJOR} --destination ${DOCKER_HUB_REPO}:stable"
- /kaniko/executor --context . ${DESTINATION} --build-arg DISCOURSE_VERSION=$DISCOURSE_VERSION
only:
- master
[submodule "install/discourse-akismet"]
path = install/discourse-akismet
url = https://github.com/discourse/discourse-akismet
[submodule "install/discourse-assign"]
path = install/discourse-assign
url = https://github.com/discourse/discourse-assign
[submodule "install/discourse-calendar"]
path = install/discourse-calendar
url = https://github.com/discourse/discourse-calendar
[submodule "install/discourse-docs"]
path = install/discourse-docs
url = https://github.com/discourse/discourse-docs
[submodule "install/discourse-encrypt"]
path = install/discourse-encrypt
url = https://github.com/discourse/discourse-encrypt
[submodule "install/discourse-locations"]
path = install/discourse-locations
url = https://github.com/paviliondev/discourse-locations
[submodule "install/discourse-legal-tools"]
path = install/discourse-legal-tools
url = https://github.com/paviliondev/discourse-legal-tools
[submodule "install/discourse-math"]
path = install/discourse-math
url = https://github.com/discourse/discourse-math
[submodule "install/discourse-openid-connect"]
path = install/discourse-openid-connect
url = https://github.com/discourse/discourse-openid-connect
[submodule "install/discourse-solved"]
path = install/discourse-solved
url = https://github.com/discourse/discourse-solved
[submodule "install/discourse-topic-voting"]
path = install/discourse-topic-voting
url = https://github.com/discourse/discourse-topic-voting
[submodule "install/discourse-air"]
path = install/discourse-air
url = https://github.com/discourse/discourse-air
[submodule "install/discourse-reactions"]
path = install/discourse-reactions
url = https://github.com/discourse/discourse-reactions
[submodule "install/discourse-templates"]
path = install/discourse-templates
url = https://github.com/discourse/discourse-templates
[submodule "install/discourse-docs-card-filter"]
path = install/discourse-docs-card-filter
url = https://github.com/discourse/discourse-docs-card-filter
[submodule "install/discourse-events"]
path = install/discourse-events
url = https://github.com/paviliondev/discourse-events
FROM ruby:2.6.5 FROM golang:1.22 as refresh-assets
WORKDIR /app
COPY refresh-assets/go.mod refresh-assets/go.sum ./
RUN go mod download
COPY refresh-assets/*.go ./
RUN CGO_ENABLED=0 GOOS=linux go build -o /refresh-assets
ARG DISCOURSE_VERSION FROM debian:bullseye-slim
ENV RAILS_ENV=production \ # slim https://github.com/discourse/discourse_docker/blob/main/image/base/slim.Dockerfile#L5
DEBIAN_VERSION=buster \ ENV RUBY_ALLOCATOR=/usr/lib/libjemalloc.so.1 \
DISCOURSE_DB_HOST=postgres \ RUSTUP_HOME=/usr/local/rustup \
DISCOURSE_REDIS_HOST=redis \ CARGO_HOME=/usr/local/cargo \
DISCOURSE_SERVE_STATIC_ASSETS=true \ PATH=/usr/local/cargo/bin:$PATH \
DISCOURSE_VERSION=${DISCOURSE_VERSION} \ LEFTHOOK=0
GIFSICLE_VERSION=1.92 \ # release https://github.com/discourse/discourse_docker/blob/main/image/base/release.Dockerfile#L6
PNGQUANT_VERSION=2.12.5 \ ENV RAILS_ENV=production
PNGCRUSH_VERSION=1.8.13 \ # web template https://github.com/discourse/discourse_docker/blob/main/templates/web.template.yml#L1
JEMALLOC_NEW=3.6.0 \ ENV DISCOURSE_SERVE_STATIC_ASSETS=true \
JEMALLOC_STABLE=5.2.0 \ SKIP_EMBER_CLI_COMPILE=1 \
PG_MAJOR=10 \
NODE_MAJOR=10 \
RUBY_GLOBAL_METHOD_CACHE_SIZE=131072 \
RUBY_GC_HEAP_GROWTH_MAX_SLOTS=40000 \ RUBY_GC_HEAP_GROWTH_MAX_SLOTS=40000 \
RUBY_GC_HEAP_INIT_SLOTS=400000 \ RUBY_GC_HEAP_INIT_SLOTS=400000 \
RUBY_GC_HEAP_OLDOBJECT_LIMIT_FACTOR=1.5 \ RUBY_GC_HEAP_OLDOBJECT_LIMIT_FACTOR=1.5
RUBY_GC_MALLOC_LIMIT=90000000 \
BUILD_DEPS="\ #LABEL maintainer="Sam Saffron \"https://twitter.com/samsaffron\""
autoconf \
advancecomp \ RUN echo 'deb http://deb.debian.org/debian bullseye-backports main' > /etc/apt/sources.list.d/bullseye-backports.list
libbz2-dev \ RUN echo "debconf debconf/frontend select Teletype" | debconf-set-selections
libfreetype6-dev \ RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get -y install gnupg sudo curl
libjpeg-dev \
libjpeg-turbo-progs \ RUN DEBIAN_FRONTEND=noninteractive apt-get install -y locales locales-all
libtiff-dev \ ENV LC_ALL en_US.UTF-8
pkg-config" ENV LANG en_US.UTF-8
ENV LANGUAGE en_US.UTF-8
COPY install /tmp/install
RUN curl --silent --location https://deb.nodesource.com/setup_18.x | sudo bash -
RUN ls /tmp/ && ls /tmp/install RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -
RUN echo "deb https://dl.yarnpkg.com/debian/ stable main" > /etc/apt/sources.list.d/yarn.list
RUN curl http://apt.postgresql.org/pub/repos/apt/ACCC4CF8.asc | apt-key add - \ RUN apt-get -y update
&& echo "deb http://apt.postgresql.org/pub/repos/apt/ ${DEBIAN_VERSION}-pgdg main" | \ # install these without recommends to avoid pulling in e.g.
tee /etc/apt/sources.list.d/postgres.list \ # X11 libraries, mailutils
&& curl --silent --location https://deb.nodesource.com/setup_${NODE_MAJOR}.x | bash - \ RUN DEBIAN_FRONTEND=noninteractive apt-get -y install --no-install-recommends git jq
&& apt-get update && apt-get install -y --no-install-recommends \ RUN DEBIAN_FRONTEND=noninteractive apt-get -y install autoconf build-essential ca-certificates \
${BUILD_DEPS} \ libxslt-dev libcurl4-openssl-dev \
brotli \ libssl-dev libyaml-dev libtool \
ghostscript \ libpcre3 libpcre3-dev zlib1g zlib1g-dev \
gsfonts \ libxml2-dev gawk \
jpegoptim \ libreadline-dev libpq-dev \
liblqr-1-0 \ psmisc whois brotli libunwind-dev \
libxml2 \ libtcmalloc-minimal4 cmake \
nodejs \ pngcrush pngquant ripgrep
optipng \
jhead \ RUN cd / &&\
postgresql-client-${PG_MAJOR} \ apt-get clean &&\
postgresql-contrib-${PG_MAJOR} libpq-dev libreadline-dev \ locale-gen en_US &&\
&& npm install svgo uglify-js -g \ DEBIAN_FRONTEND=noninteractive apt-get install -y wget nodejs yarn &&\
&& mkdir /jemalloc-stable && cd /jemalloc-stable &&\ npm install -g terser uglify-js pnpm
wget https://github.com/jemalloc/jemalloc/releases/download/${JEMALLOC_STABLE}/jemalloc-${JEMALLOC_STABLE}.tar.bz2 &&\
tar -xjf jemalloc-${JEMALLOC_STABLE}.tar.bz2 && cd jemalloc-${JEMALLOC_STABLE} && ./configure --prefix=/usr && make && make install &&\ ADD install-imagemagick /tmp/install-imagemagick
cd / && rm -rf /jemalloc-stable \ RUN /tmp/install-imagemagick
&& mkdir /jemalloc-new && cd /jemalloc-new &&\
wget https://github.com/jemalloc/jemalloc/releases/download/${JEMALLOC_NEW}/jemalloc-${JEMALLOC_NEW}.tar.bz2 &&\ ADD install-jemalloc /tmp/install-jemalloc
tar -xjf jemalloc-${JEMALLOC_NEW}.tar.bz2 && cd jemalloc-${JEMALLOC_NEW} && ./configure --prefix=/usr --with-install-suffix=${JEMALLOC_NEW} && make build_lib && make install_lib &&\ RUN /tmp/install-jemalloc
cd / && rm -rf /jemalloc-new \
&& gem update --system \ ADD install-rust /tmp/install-rust
&& gem install bundler --force \ ADD install-ruby /tmp/install-ruby
&& rm -rf /usr/local/share/ri/${RUBY_VERSION}/system \ ADD install-oxipng /tmp/install-oxipng
&& /tmp/install/imagemagick \ RUN /tmp/install-rust && /tmp/install-ruby && /tmp/install-oxipng && rustup self uninstall -y
# Validate install
&& ruby -Eutf-8 -e "v = \`convert -version\`; %w{png tiff jpeg freetype}.each { |f| unless v.include?(f); STDERR.puts('no ' + f + ' support in imagemagick'); exit(-1); end }" \ RUN echo 'gem: --no-document' >> /usr/local/etc/gemrc &&\
&& /tmp/install/pngcrush \ gem update --system
&& /tmp/install/gifsicle \
&& /tmp/install/pngquant \ # This tool allows us to disable huge page support for our current process
&& addgroup --gid 1000 discourse \ # since the flag is preserved through forks and execs it can be used on any
&& adduser --system --uid 1000 --ingroup discourse --shell /bin/bash discourse \ # process
&& cd /home/discourse \ ADD thpoff.c /src/thpoff.c
&& mkdir -p tmp/pids \ RUN gcc -o /usr/local/sbin/thpoff /src/thpoff.c && rm /src/thpoff.c
&& mkdir -p ./tmp/sockets \
&& git clone --branch ${DISCOURSE_VERSION} https://github.com/discourse/discourse.git \ # clean up for docker squash
&& chown -R discourse:discourse . \ RUN rm -fr /usr/share/man &&\
&& cd /home/discourse/discourse \ rm -fr /usr/share/doc &&\
&& git remote set-branches --add origin tests-passed \ rm -fr /usr/share/vim/vim74/doc &&\
&& sed -i 's/daemonize true/daemonize false/g' ./config/puma.rb \ rm -fr /usr/share/vim/vim74/lang &&\
&& bundle config build.nokogiri --use-system-libraries \ rm -fr /usr/share/vim/vim74/spell/en* &&\
&& bundle install --deployment --verbose --without test --without development --retry 3 --jobs 4 \ rm -fr /usr/share/vim/vim74/tutor &&\
&& find /home/discourse/discourse/vendor/bundle -name tmp -type d -exec rm -rf {} + \ rm -fr /usr/local/share/doc &&\
&& apt-get remove -y --purge ${BUILD_DEPS} \ rm -fr /usr/local/share/ri &&\
#&& apt-get autoremove -y \ rm -fr /usr/local/share/ruby-build &&\
&& rm -rf /var/lib/apt/lists/* rm -fr /var/lib/apt/lists/* &&\
rm -fr /root/.gem &&\
RUN cd /home/discourse/discourse/plugins \ rm -fr /root/.npm &&\
&& for plugin in $(cat /tmp/install/plugin-list); do \ rm -fr /tmp/*
git clone $plugin; \
done \ # this can probably be done, but I worry that people changing PG locales will have issues
&& chown -R discourse:discourse . # cd /usr/share/locale && rm -fr `ls -d */ | grep -v en`
WORKDIR /home/discourse/discourse # this is required for aarch64 which uses buildx
# see https://github.com/docker/buildx/issues/150
RUN rm -f /etc/service
ARG DISCOURSE_VERSION
# Discourse specific bits
RUN useradd discourse -s /bin/bash -m -U &&\
install -dm 0755 -o discourse -g discourse /var/www/discourse &&\
sudo -u discourse curl -s -L https://github.com/discourse/discourse/archive/refs/tags/${DISCOURSE_VERSION}.tar.gz | tar xvz -C /var/www/discourse --strip-components 1 &&\
gem install bundler --conservative -v $(awk '/BUNDLED WITH/ { getline; gsub(/ /,""); print $0 }' /var/www/discourse/Gemfile.lock) &&\
chown -R discourse:discourse /var/www/discourse
USER discourse USER discourse
WORKDIR /var/www/discourse
RUN bundle config --local deployment true &&\
bundle config --local path ./vendor/bundle &&\
bundle config --local without test development &&\
bundle config --local jobs 4 && \
bundle install &&\
yarn install --frozen-lockfile &&\
yarn cache clean &&\
find /var/www/discourse/vendor/bundle -name tmp -type d -exec rm -rf {} +
COPY --chown=1000:1000 install/ /var/www/discourse/plugins/
RUN cd app/assets/javascripts/discourse && \
/var/www/discourse/app/assets/javascripts/node_modules/.bin/ember build -prod
COPY --chown=1000:1000 app.sh .
COPY --chown=1000:1000 sidekiq.sh .
COPY --chown=1000:1000 upgrade.sh .
COPY --chown=1000:1000 --from=refresh-assets /refresh-assets .
CMD ["bundle", "exec", "rails", "server", "-b", "0.0.0.0"] CMD ["bundle", "exec", "rails", "server", "-b", "0.0.0.0"]
\ No newline at end of file
VERSION=$(shell cat VERSION)
TAG?=${VERSION}
all: update build push
update:
python3 scripts/discourse-plugins.py ${VERSION}
build:
sudo podman build -t quay.io/libre.sh/discourse:${TAG} --build-arg DISCOURSE_VERSION=${VERSION} .
push:
sudo podman push quay.io/libre.sh/discourse:${TAG}
\ No newline at end of file
# docker-discourse # docker-discourse
discourse image for discourse service Discourse image for discourse service
It is based on [upstream discourse image](https://hub.docker.com/r/discourse/base/)
## Discourse plugins ## Discourse plugins
This image supports installing Discourse plugins at build time, via the `DISCOURSE_ADDITIONAL_PLUGINS` [build arg](https://docs.docker.com/engine/reference/builder/#/arg). Set it to a whitespace (space, tab, newline) separated list if valid `git` URLs of plugins to be installed at build time. This image supports installing Discourse plugins at build time, via the `install/plugin-list` file. It lists`git` URLs of plugins to be installed at build time.
\ No newline at end of file \ No newline at end of file
v3.2.2
\ No newline at end of file
#!/bin/bash
set -euxo pipefail
bundle exec rake assets:precompile:theme_transpiler
exec bundle exec config/unicorn_launcher -E production -c config/unicorn.conf.rb
\ No newline at end of file
...@@ -2,35 +2,39 @@ ...@@ -2,35 +2,39 @@
set -e set -e
# version check: https://github.com/ImageMagick/ImageMagick/releases # version check: https://github.com/ImageMagick/ImageMagick/releases
IMAGE_MAGICK_VERSION="7.0.10-6" IMAGE_MAGICK_VERSION="7.1.0-62"
IMAGE_MAGICK_HASH="37d36f4d736eb16e0dd43c50302e1d01d1bb1125165333df8273508a22f8a64d" IMAGE_MAGICK_HASH="d282117bc6d0e91ad1ad685d096623b96ed8e229f911c891d83277b350ef884a"
# version check: https://libpng.sourceforge.io/index.html # We use debian, but GitHub CI is stuck on Ubuntu Bionic, so this must be compatible with both
LIBPNG_VERSION="1.6.37" LIBJPEGTURBO=$(cat /etc/issue | grep -qi Debian && echo 'libjpeg62-turbo libjpeg62-turbo-dev' || echo 'libjpeg-turbo8 libjpeg-turbo8-dev')
LIBPNG_HASH="daeb2620d829575513e35fecc83f0d3791a620b9b93d800b763542ece9390fb4"
# Ubuntu 22.04/22.10 doesn't have libwebp6
LIBWEBP=$(cat /etc/issue | grep -qi 'Ubuntu 22' && echo 'libwebp7' || echo 'libwebp6')
PREFIX=/usr/local PREFIX=/usr/local
WDIR=/tmp/imagemagick WDIR=/tmp/imagemagick
# Install build deps # Install build deps
apt -y -q remove imagemagick apt -y -q remove imagemagick
apt -y -q install git make gcc pkg-config autoconf curl g++ yasm cmake \
libde265-0 libde265-dev ${LIBJPEGTURBO} x265 libx265-dev libtool \
libpng16-16 libpng-dev ${LIBJPEGTURBO} ${LIBWEBP} libwebp-dev libgomp1 \
libwebpmux3 libwebpdemux2 ghostscript libxml2-dev libxml2-utils librsvg2-dev \
libltdl7-dev libbz2-dev gsfonts libtiff-dev libfreetype6-dev libjpeg-dev
# Ubuntu doesn't like `bullseye-backports`
if cat /etc/issue | grep -qi 'Ubuntu 22'; then
apt -y install libheif1 libaom-dev libheif-dev
else
# Use backports instead of compiling it
apt -y -q install -t bullseye-backports libheif1 libaom-dev libheif-dev
fi
mkdir -p $WDIR mkdir -p $WDIR
cd $WDIR cd $WDIR
# Build and install libpng
wget -O $WDIR/libpng.tar.gz https://prdownloads.sourceforge.net/libpng/libpng-$LIBPNG_VERSION.tar.gz?download
sha256sum $WDIR/libpng.tar.gz
echo "$LIBPNG_HASH $WDIR/libpng.tar.gz" | sha256sum -c
tar -xzvf $WDIR/libpng.tar.gz
cd $WDIR/libpng-$LIBPNG_VERSION
./configure --prefix=$PREFIX
make all && make install
# Build and install ImageMagick # Build and install ImageMagick
wget -O $WDIR/ImageMagick.tar.gz "https://github.com/ImageMagick/ImageMagick/archive/$IMAGE_MAGICK_VERSION.tar.gz" wget -q -O $WDIR/ImageMagick.tar.gz "https://github.com/ImageMagick/ImageMagick/archive/$IMAGE_MAGICK_VERSION.tar.gz"
sha256sum $WDIR/ImageMagick.tar.gz sha256sum $WDIR/ImageMagick.tar.gz
echo "$IMAGE_MAGICK_HASH $WDIR/ImageMagick.tar.gz" | sha256sum -c echo "$IMAGE_MAGICK_HASH $WDIR/ImageMagick.tar.gz" | sha256sum -c
IMDIR=$WDIR/$(tar tzf $WDIR/ImageMagick.tar.gz --wildcards "ImageMagick-*/configure" |cut -d/ -f1) IMDIR=$WDIR/$(tar tzf $WDIR/ImageMagick.tar.gz --wildcards "ImageMagick-*/configure" |cut -d/ -f1)
...@@ -54,9 +58,15 @@ PKG_CONF_LIBDIR=$PREFIX/lib LDFLAGS=-L$PREFIX/lib CFLAGS=-I$PREFIX/include ./con ...@@ -54,9 +58,15 @@ PKG_CONF_LIBDIR=$PREFIX/lib LDFLAGS=-L$PREFIX/lib CFLAGS=-I$PREFIX/include ./con
--without-lcms \ --without-lcms \
--with-lzma \ --with-lzma \
--with-png \ --with-png \
--with-tiff --with-tiff \
--with-heic \
--with-rsvg \
--with-webp
make all && make install make all && make install
cd $HOME cd $HOME
rm -rf $WDIR rm -rf $WDIR
ldconfig /usr/local/lib ldconfig /usr/local/lib
\ No newline at end of file
# Validate ImageMagick install
test $(convert -version | grep -o -e png -e tiff -e jpeg -e freetype -e heic -e webp | wc -l) -eq 6
#!/bin/bash
set -e
# version check: https://github.com/jemalloc/jemalloc/releases
# jemalloc stable
mkdir /jemalloc-stable
cd /jemalloc-stable
wget -q https://github.com/jemalloc/jemalloc/releases/download/3.6.0/jemalloc-3.6.0.tar.bz2
sha256sum jemalloc-3.6.0.tar.bz2
echo "e16c2159dd3c81ca2dc3b5c9ef0d43e1f2f45b04548f42db12e7c12d7bdf84fe jemalloc-3.6.0.tar.bz2" | sha256sum -c
tar --strip-components=1 -xjf jemalloc-3.6.0.tar.bz2
./configure --prefix=/usr && make && make install
cd / && rm -rf /jemalloc-stable
# jemalloc new
mkdir /jemalloc-new
cd /jemalloc-new
wget -q https://github.com/jemalloc/jemalloc/releases/download/5.3.0/jemalloc-5.3.0.tar.bz2
sha256sum jemalloc-5.3.0.tar.bz2
echo "2db82d1e7119df3e71b7640219b6dfe84789bc0537983c3b7ac4f7189aecfeaa jemalloc-5.3.0.tar.bz2" | sha256sum -c
tar --strip-components=1 -xjf jemalloc-5.3.0.tar.bz2
./configure --prefix=/usr --with-install-suffix=5.3.0 && make build_lib && make install_lib
cd / && rm -rf /jemalloc-new
#!/bin/bash
set -e
# version check: https://github.com/shssoichiro/oxipng/releases
OXIPNG_VERSION="8.0.0"
OXIPNG_HASH="ef96d6340e70900de0a38ace8f5f20878f6c256b18b0c59cd87f2b515437b87b"
OXIPNG_ARCHIVE="v${OXIPNG_VERSION}.tar.gz"
OXIPNG_DIR="oxipng-${OXIPNG_VERSION}"
# Install other deps
apt-get -y install advancecomp jhead jpegoptim libjpeg-turbo-progs optipng
cd /tmp
wget -q https://github.com/shssoichiro/oxipng/archive/refs/tags/${OXIPNG_ARCHIVE}
sha256sum ${OXIPNG_ARCHIVE}
echo "${OXIPNG_HASH} ${OXIPNG_ARCHIVE}" | sha256sum -c
tar -zxf ${OXIPNG_ARCHIVE}
cd ${OXIPNG_DIR}
CARGO_REGISTRIES_CRATES_IO_PROTOCOL=sparse /usr/local/cargo/bin/cargo build --release
cp target/release/oxipng /usr/local/bin
cd / && rm -fr /tmp/${OXIPNG_DIR}
#!/bin/bash
set -e
RUBY_VERSION="3.2.2"
export CONFIGURE_OPTS="--enable-yjit"
apt-get -y install --no-install-recommends ruby bison libffi-dev
mkdir /src
git -C /src clone https://github.com/rbenv/ruby-build.git
cd /src/ruby-build && ./install.sh
cd / && rm -fr /src
ruby-build ${RUBY_VERSION} /usr/local
apt-get -y purge ruby
#!/bin/bash
set -e
# see https://github.com/rust-lang/docker-rust/blob/master/Dockerfile-debian.template
export RUSTUP_HOME=/usr/local/rustup
export CARGO_HOME=/usr/local/cargo
export PATH=/usr/local/cargo/bin:$PATH
export RUST_VERSION=1.68.0
export RUSTUP_VERSION=1.25.2
dpkgArch="$(dpkg --print-architecture)"
case "${dpkgArch##*-}" in
amd64) rustArch='x86_64-unknown-linux-gnu'; rustupSha256='bb31eaf643926b2ee9f4d8d6fc0e2835e03c0a60f34d324048aa194f0b29a71c' ;;
armhf) rustArch='armv7-unknown-linux-gnueabihf'; rustupSha256='6626b90205d7fe7058754c8e993b7efd91dedc6833a11a225b296b7c2941194f' ;;
arm64) rustArch='aarch64-unknown-linux-gnu'; rustupSha256='4ccaa7de6b8be1569f6b764acc28e84f5eca342f5162cd5c810891bff7ed7f74' ;;
i386) rustArch='i686-unknown-linux-gnu'; rustupSha256='34392b53a25c56435b411d3e575b63aab962034dd1409ba405e708610c829607' ;;
*) echo >&2 "unsupported architecture: ${dpkgArch}"; exit 1 ;;
esac
url="https://static.rust-lang.org/rustup/archive/${RUSTUP_VERSION}/${rustArch}/rustup-init"
wget "$url"
echo "${rustupSha256} *rustup-init" | sha256sum -c -
chmod +x rustup-init
./rustup-init -y --no-modify-path --profile minimal --default-toolchain $RUST_VERSION --default-host ${rustArch}
rm rustup-init
chmod -R a+w $RUSTUP_HOME $CARGO_HOME
rustup --version
cargo --version
rustc --version
Subproject commit 85dc24d6b58d1b16e6d225ae710633dc20c34d08
Subproject commit 248ccf70bdb8b5f3e773688cb2954548cd0fb9d9
Subproject commit 56b0de3896361b6a87523537c8f5b450d2fe0807
Subproject commit 84ef46a38cf02748ecacad16c5d9c6fec12dc8da
Subproject commit 94c7b7da216c66d773f800a714493f087affaac9
Subproject commit a601e3c5807b4152e3fe6fc6673bc2a99e6a829d
Subproject commit 9013a8ea8c7c7df55b36f329b3bb09b754a04cfe
Subproject commit cab38405bdd58a17ae67cb2166fab045d5c65019