Skip to content

Commit

Permalink
fix arm build #5
Browse files Browse the repository at this point in the history
  • Loading branch information
root committed Mar 29, 2023
1 parent b7cbe8e commit d4a3cc7
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 154 deletions.
5 changes: 1 addition & 4 deletions Dockerfile.arm64
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ ARG MIRROR

ENV TZ=Asia/Shanghai

RUN install_packages curl wget zip unzip s6 pwgen cron netcat
RUN install_packages curl wget zip unzip s6 pwgen cron netcat ca-certificates vim-tiny

# Install php-ext
RUN . /opt/easysoft/scripts/libcomponent.sh && component_unpack "php-ext" "7.4.30"
Expand Down Expand Up @@ -43,9 +43,6 @@ COPY debian/rootfs /
WORKDIR /apps/zentao
RUN mkdir -pv /usr/local/etc/php \
&& mv /etc/php/7.4/php.ini.tpl /usr/local/etc/php/php.ini.tpl \
&& mv /etc/s6/s6-init/run.arm64 /etc/s6/s6-init/run \
&& mv /etc/s6/s6-init/envs.arm64 /etc/s6/s6-init/envs \
&& mv /etc/s6/s6-available/check_files/run.arm64 /etc/s6/s6-available/check_files/run \
&& chown www-data.www-data /apps/zentao -R \
&& docker-php-ext-enable ioncube_loader

Expand Down
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ build-all: build build-biz build-biz-k8s build-max build-max-k8s ## 构建禅
build: ## 构建开源版镜像
docker build --build-arg VERSION=$(OPEN_VER) -t hub.qucheng.com/app/$(APP_NAME):$(OPEN_VER)-$(BUILD_DATE) -f Dockerfile .

build-arm: ## 构建开源版镜像ARM
docker build --platform arm64 --build-arg VERSION=$(OPEN_VER) -t hub.qucheng.com/app/$(APP_NAME):$(OPEN_VER)-$(BUILD_DATE) -f Dockerfile.arm64 .

build-biz: ## 构建企业版镜像
docker build --build-arg VERSION=$(BIZ_VER) -t hub.qucheng.com/app/$(APP_NAME):$(BIZ_VER)-$(BUILD_DATE) -f Dockerfile .

Expand Down
68 changes: 0 additions & 68 deletions debian/rootfs/etc/s6/s6-init/envs.arm64

This file was deleted.

16 changes: 11 additions & 5 deletions debian/rootfs/etc/s6/s6-init/run
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,18 @@ done
#=====================#
# Prepare PHP #
#=====================#
PHP_CLI_INI="/etc/php/7.4/cli/php.ini"
PHP_APACHE_INI="/etc/php/7.4/apache2/php.ini"

info "Render php.ini with environment variables."
/usr/bin/render-template /etc/php/7.4/php.ini.tpl > ${PHP_CLI_INI}
/usr/bin/render-template /etc/php/7.4/php.ini.tpl > ${PHP_APACHE_INI}
if [ "$OS_ARCH" == "arm64" ];then
info "render template php.ini for arm64."
PHP_INI="/usr/local/etc/php/php.ini"
/usr/bin/render-template ${PHP_INI}.tpl > ${PHP_INI}
else
info "render template php.ini for arm64."
PHP_CLI_INI="/etc/php/7.4/cli/php.ini"
PHP_APACHE_INI="/etc/php/7.4/apache2/php.ini"
/usr/bin/render-template /etc/php/7.4/php.ini.tpl > ${PHP_CLI_INI}
/usr/bin/render-template /etc/php/7.4/php.ini.tpl > ${PHP_APACHE_INI}
fi

# enable redis extension
if [ "$PHP_SESSION_TYPE" == "redis" ];then
Expand Down
77 changes: 0 additions & 77 deletions debian/rootfs/etc/s6/s6-init/run.arm64

This file was deleted.

0 comments on commit d4a3cc7

Please sign in to comment.