Giter Site home page Giter Site logo

dockerfile-test's Introduction

인수 인계

1. 도커 파일 생성

  • Dockerfile 생성

2. 스크립트 작성

FROM centos:6

USER root

RUN yum update -y
RUN yum install -y wget

RUN yum install -y epel-release
RUN yum install -y gcc libxml2-devel openssl-devel libcurl-devel libjpeg-devel libpng-devel php-mcrypt libmcrypt-devel

RUN yum install -y http://opensource.wandisco.com/centos/6/git/x86_64/wandisco-git-release-6-1.noarch.rpm
RUN yum install -y git

RUN wget http://jp2.php.net/get/php-5.3.29.tar.gz/from/this/mirror

RUN mv mirror php-5.3.29.tar.gz

RUN tar -xvf php-5.3.29.tar.gz

RUN cd ./php-5.3.29 && ./configure --prefix=/usr/local/php55 --bindir=/usr/bin  --disable-debug --enable-sigchild --enable-inline-optimization --enable-sysvsem --enable-sysvshm --enable-bcmath --enable-ftp --enable-sockets --enable-exif --enable-soap --with-zlib-dir=/usr --with-zlib --with-gd --with-jpeg-dir=/usr --with-png-dir=/usr  --with-iconv --enable-mbstring --with-mcrypt --with-curl --with-openssl --enable-zip

RUN cd ./php-5.3.29 && make && make install

RUN rm -rf ./php-5.3.29.tar.gz ./php-5.3.29

RUN php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
RUN php -r "if (hash_file('sha384', 'composer-setup.php') === '48e3236262b34d30969dca3c37281b3b4bbe3221bda826ac6a9a62d6444cdb0dcd0615698a5cbe587c3f0fe57a54d8f5') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
RUN php composer-setup.php --install-dir=/usr/bin --filename=composer
RUN php -r "unlink('composer-setup.php');"

RUN yum install -y svn sshpass

RUN yum clean all

3. hub.docker.com

  • 계정 생성
  • github 연동
  • Repository 생성 (github repository 연동)

4. build 확인

5. 직접 build & push

$ docker build --tag <Docker Hub 사용자 계정>/<이미지 이름>:<태그>

$ docker push <Docker Hub 사용자 계정>/<이미지 이름>:<태그>

# 실제 예
$ docker build --tag ongar/centos6-php:latest

$ docker push ongar/centos6-php:latest
  • 만약 빌드 된 이미지 태그를 바꾸고 싶은 경우
$ docker tag ongar/centos6-php:latest ongar2/centos-php:latest

dockerfile-test's People

Contributors

ong-ar avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.