File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ # Load stack utils
4+ . /usr/bin/stack-utils
5+
6+ # Implement build function
7+ function build() {
8+ cat << EOF > ${PROFILE_DIR} /${STACK_NAME} .sh
9+ export GEM_HOME=/opt/drycc/fluentd
10+ export BUNDLE_SILENCE_ROOT_WARNING=1
11+ export BUNDLE_APP_CONFIG="$GEM_HOME "
12+ export PATH=$GEM_HOME /bin:$PATH
13+ EOF
14+ . ${PROFILE_DIR} /${STACK_NAME} .sh
15+ ./make.sh
16+ echo " export LD_PRELOAD=/usr/lib/libjemalloc.so.2" >> ${PROFILE_DIR} /${STACK_NAME} .sh
17+ cp -rf /opt/drycc/fluentd/* " ${DATA_DIR} "
18+ }
19+
20+ # call build stack
21+ build-stack " ${1} "
Original file line number Diff line number Diff line change 1+ install-stack ruby 3.1.0
2+ . /opt/drycc/ruby/profile.d/* .sh
3+
4+
5+ apt-get update \
6+ && apt-get install -y --no-install-recommends \
7+ ca-certificates \
8+ && buildDeps=" \
9+ make gcc g++ libc-dev \
10+ wget bzip2 gnupg dirmngr \
11+ " \
12+ && apt-get install -y --no-install-recommends $buildDeps \
13+ && echo ' gem: --no-document' >> /etc/gemrc \
14+ && gem install oj -v 3.10.18 \
15+ && gem install json -v 2.4.1 \
16+ && gem install async-http -v 0.54.0 \
17+ && gem install fluentd -v 1.14.5 \
18+ && wget -O /tmp/jemalloc-4.5.0.tar.bz2 https://github.com/jemalloc/jemalloc/releases/download/4.5.0/jemalloc-4.5.0.tar.bz2 \
19+ && cd /tmp && tar -xjf jemalloc-4.5.0.tar.bz2 && cd jemalloc-4.5.0/ \
20+ && ./configure && make \
21+ && mkdir -p /opt/drycc/fluentd/lib \
22+ && mv lib/libjemalloc.so.2 /opt/drycc/fluentd/lib \
23+ && apt-get purge -y --auto-remove \
24+ -o APT::AutoRemove::RecommendsImportant=false \
25+ $buildDeps \
26+ && rm -rf /var/lib/apt/lists/* \
27+ && rm -rf /tmp/* /var/tmp/*
You can’t perform that action at this time.
0 commit comments