Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

    •  도커 이미지는 docker build를 사용하여 생성한다. 

      Code Block
      themeEmacs
      languagenone
      docker build [OPTIONS] PATH | URL | -
      OPTIONIS : 
               --force-rm        Always remove intermediate containers
               --no-cache        Do not use cache when building the image
               --pull            Always attempt to pull a newer version of the image
               -q, --quiet       Suppress the build output and print image ID on success
               --rm              Remove intermediate containers after a successful build (default true)
               -t, --tag list    Name and optionally a tag in the 'name:tag' format 

      OPTIONS에 대한 좀 더 자세한 내용은 여기에서 확인할 수 있다.

       

      Code Block
      themeEmacs
      languagebash
      # docker build -t altitest:0.0 ./
      Sending build context to Docker daemon  721.7MB
      Step 1/12 : FROM  ubuntu:18.04
       ---> cf0f3ca922e0
      Step 2/12 : MAINTAINER JEONG
       ---> Running in 20b8a511ef81
      Removing intermediate container 20b8a511ef81
       ---> f7b43fc90f83
      Step 3/12 : RUN useradd -d /home/altibase -s /bin/bash -m altibase; sed -e '56 i\altibase\t\t soft\t nofile\t\t 1048576 \naltibase\t\t hard\t nofile\t\t 1048576 \naltibase\t\t soft\t nproc\t\t unlimited \naltibase\t\t hard\t nproc\t\t unlimited \n' -i /etc/security/limits.conf; echo "vm.swappiness = 1" >> /etc/sysctl.conf; echo "kernel.sem = 20000        32000   512     5029" >> /etc/sysctl.conf;
       ---> Running in 88b3e8fa9508
      Removing intermediate container 88b3e8fa9508
       ---> dc1994514a5f
      Step 4/12 : COPY set_altibase.env /home/altibase
       ---> a039fabb1003
      Step 5/12 : COPY docker-entrypoint.sh /home/altibase
       ---> 3ee3d3eda79b
      Step 6/12 : COPY altibase_home /home/altibase/altibase_home
       ---> bafec9edb96b
      Step 7/12 : RUN chown -R altibase:altibase /home/altibase/*
       ---> Running in f1913e2d7e32
      Removing intermediate container f1913e2d7e32
       ---> e4d56135882f
      Step 8/12 : USER altibase
       ---> Running in a1e4f2b96ee3
      Removing intermediate container a1e4f2b96ee3
       ---> aad721f27620
      Step 9/12 : WORKDIR /home/altibase
       ---> Running in 4081c1fcc20a
      Removing intermediate container 4081c1fcc20a
       ---> b8f3497fc294
      Step 10/12 : ENV MODE shell
       ---> Running in 9167fee80677
      Removing intermediate container 9167fee80677
       ---> af201a060152
      Step 11/12 : EXPOSE 20300 30300
       ---> Running in ff0db6b12515
      Removing intermediate container ff0db6b12515
       ---> 7a1727561c45
      Step 12/12 : ENTRYPOINT ["/bin/bash", "/home/altibase/docker-entrypoint.sh"]
       ---> Running in 1eeccd7174e9
      Removing intermediate container 1eeccd7174e9
       ---> 275b96f6ba53
      Successfully built 275b96f6ba53
      Successfully tagged altitest:0.0
      

 


 



Altibase 서비스  컨테이너 생성 

...

 

컨테이너 생성

...

  • 도커이미지로 컨테이너를  생성할 때는 docker run을 사용한다.

    Code Block
    themeEmacs
    languagenone
    docker run [OPTIONS] IMAGE[:TAG|@DIGEST] [COMMAND] [ARG...]
    OPTIONIS : 
              -a, --attach list             Attach to STDIN, STDOUT or STDERR
              --cpus decimal                Number of CPUs
              -m, --memory bytes            Memory limit
              -d, --detach                  Run container in background and print container ID
              -e, --env list                Set environment variables
              --env-file list               Read in a file of environment variables
              -i, --interactive             Keep STDIN open even if not attached
              --privileged                  Give extended privileges to this container
              -t, --tty                     Allocate a pseudo-TTY
              -u, --user string             Username or UID (format: <name|uid>[:<group|gid>])
              -v, --volume list             Bind mount a volume
              -w, --workdir string          Working directory inside the container

    OPTION에 대한 좀 더 자세한 내용은 여기에서 확인할 수 있다.

...