Skip to content

AWS EC2 우분트 16.04 에 php5.3 깔다 돌아가실 것 같아서, 'slawekkolodziej/php-5.3-ioncube' 도커 이미지를 대신 올려서 이용하기 위함.

Notifications You must be signed in to change notification settings

lemoncloud-io/php-5.3-ioncube

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PHP-5.3-IONCUBE

Docker image based on slawekkolodziej/php-5.3-ioncube which based on eugeneware/php-5.3.

It adds support for:

Commands

  • 기본 실행 명령: supervisord which then starts nginx, php-fpm and exim.
# see Dockerfile.
["/usr/bin/supervisord", "-c", "/etc/supervisor/conf.d/supervisord-web.conf"]

실행 팁

  • 이 도커를 빌드 하는 방법 (우선, docker 설치 필요)
$ git clone [email protected]:lemoncloud-io/php-5.3-ioncube.git
$ cd php-5.3-ioncube
$ sudo docker build -t php53-ioncube .
  • 기본 실행 명령어
$ sudo docker run -it --rm --name my-app php53-ioncube
  • 여러가지 실행 방법
# 현재 위치 "$PWD"를 /var/www/html 에 연결 시켜서 실행.
$ docker run -it --rm --name my-running-app -v "$PWD":/var/www/html php53-ioncube

# 포트 포워딩으로 8000 -> 80 으로 설정하고, 초기 실행을 bash 쉘로 보이게.
$ docker run -it --rm --name my-running-app -v -p 8000:80 php53-ioncube /bin/bash

AWS ECR Repository

  • From AWS ECR -> Create resposity -> input php53-ioncube, then create.
# with aws 'lemon' profile, login docker.
$ $(aws ecr get-login --profile <profile> --no-include-email --region ap-northeast-2)

# Save Account-ID by profile
$ export AWS_NO=$(aws sts get-caller-identity --output text --query 'Account' --profile <profile>)

# tag your image with a keyword. (lemon)
$ docker tag php53-ioncube:latest "$AWS_NO.dkr.ecr.ap-northeast-2.amazonaws.com/php53-ioncube:latest"

# push image to repository
$ docker push "$AWS_NO.dkr.ecr.ap-northeast-2.amazonaws.com/php53-ioncube:latest"

# pull image to repository
$ docker pull "$AWS_NO.dkr.ecr.ap-northeast-2.amazonaws.com/php53-ioncube:latest"

# tag to latest
$ docker tag "$AWS_NO.dkr.ecr.ap-northeast-2.amazonaws.com/php53-ioncube:latest" php53-ioncube:latest

참고


추가 업데이트 사항

npay 암호화 지원을 위한 (mhash 설치) @180824

  • npay는 php option --with-mhash --with-mcrypt --with-dom --with-zlib-dir 의 설정 필요함. (기본 hash가 안먹음 -_-;;)
$ cd /usr/src/php
$ ./configure --disable-cgi \
    $(command -v apxs2 > /dev/null 2>&1 && echo '--with-apxs2' || true) \
    --with-config-file-path="/usr/local/lib" \
    --with-config-file-scan-dir="/usr/local/lib/conf.d" \
    --with-mysql \
    --with-mysqli \
    --with-pdo-mysql \
    --with-openssl=/usr/local/ssl \
    --with-zlib \
    --with-zlib-dir=/lib/x86_64-linux-gnu \
    --enable-fpm \
    --with-fpm-user=www-data \
    --with-fpm-group=www-data \
    --disable-hash
$ make -j"$(nproc)"
$ make install
# $ dpkg -r bison libbison-dev
# $ apt-get purge -y --auto-remove autoconf2.13
$ make clean

$ docker-php-ext-configure hash --with-mhash=/usr
$ docker-php-ext-install hash

About

AWS EC2 우분트 16.04 에 php5.3 깔다 돌아가실 것 같아서, 'slawekkolodziej/php-5.3-ioncube' 도커 이미지를 대신 올려서 이용하기 위함.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Dockerfile 52.6%
  • Shell 47.4%