aikmeng80
aikmeng80
Code|Debug|Deploy
157 posts
Just sharing
Don't wanna be here? Send us removal request.
aikmeng80 · 8 years ago
Link
0 notes
aikmeng80 · 9 years ago
Link
0 notes
aikmeng80 · 9 years ago
Link
0 notes
aikmeng80 · 9 years ago
Link
Why Chrome 53 is Rejecting Chase Bank's Symantec Certificate - SSLMate Blog
0 notes
aikmeng80 · 9 years ago
Link
0 notes
aikmeng80 · 9 years ago
Link
0 notes
aikmeng80 · 9 years ago
Link
0 notes
aikmeng80 · 9 years ago
Link
0 notes
aikmeng80 · 9 years ago
Link
0 notes
aikmeng80 · 9 years ago
Link
0 notes
aikmeng80 · 9 years ago
Link
1 note · View note
aikmeng80 · 9 years ago
Link
0 notes
aikmeng80 · 9 years ago
Link
0 notes
aikmeng80 · 9 years ago
Link
0 notes
aikmeng80 · 9 years ago
Link
0 notes
aikmeng80 · 9 years ago
Text
When creating docker image using docker file, have you seen this error?
debconf: unable to initialize frontend: Dialog debconf: (Dialog frontend will not work on a dumb terminal, an emacs shell buffer, or without a controlling terminal.) debconf: falling back to frontend: Readline debconf: unable to initialize frontend: Readline debconf: (Can't locate Term/ReadLine.pm in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.14.2 /usr/local/share/perl/5.14.2 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.14 /usr/share/perl/5.14 /usr/local/lib/site_perl .) at /usr/share/perl5/Debconf/FrontEnd/Readline.pm line 7, <> line 19.) debconf: falling back to frontend: Teletype dpkg-preconfigure: unable to re-open stdin:
With reference to this link, adding the following line in docker file does not work for me.
ENV DEBIAN_FRONTEND noninteractive
Instead, in the same link, this command works for me.
RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections
This need to run ahead of apt-get. For example,
RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections \     
&& sudo apt-get update -y \     
&& sudo apt-get install -y \        
gcc \        
g++ \        
zlib1g-dev \        
libncurses5-dev \        
libcurl4-openssl-dev \        
libxml2-dev \        
libfreetype6-dev \        
libxft-dev \        
python-pip \        
python-dev \        
wget \     
&& apt-get clean \     
&& rm -rf /var/lib/apt/lists/*
Also, by running the entire apt-get in a single stream, this ensure docker daemon not to cache the output. This is mentioned in the best practice page. Also, apt-get clean and apt folder removal will shrink the docker image file.
0 notes
aikmeng80 · 9 years ago
Text
Beginner’s Guide to Docker Command Line - Navigate docker environment
Below are some of the commands I used quite often
List docker-machines and check docker-machine status.
docker-machine ls
Always check if docker-machine is running before running any further docker commands.
Once the docker-machine is running, connect the terminal to docker-machine
eval "$(docker-machine env default)"
Show all docker containers against current docker-machine. This includes containers that have exited or stopped. This allows us to check which container is running which image as well.
docker ps -a
Show all docker images. This allows us to check docker image tag, docker image size and date of creation
docker images
Create docker container with specific docker image. Probably will map to a drive so that the host machine can connect to docker container easier. In command below, ubuntu is the image name, 14.04 is the tag version. This command will switch the terminal to container terminal. 
docker run -ti -v $HOME/host/mapdrive:/usr/local/container/mapdrive --name containername ubuntu:14.04
To remove all running or exited containers
docker ps -aq | xargs docker rm
To remove all images in host machine
docker images -q | xargs docker rmi
Need bash access or command line access to docker container?
docker exec -it containerName bash
Refer to this link for further details.
0 notes