Showing posts with label docker. Show all posts
Showing posts with label docker. Show all posts

Sunday, May 03, 2020

docker apache2 installation

After many download and processes,

then the installation got stuck in Geographic area selection

debconf: falling back to frontend: Readline
Configuring tzdata
------------------

Please select the geographic area in which you live. Subsequent configuration
questions will narrow this down by presenting a list of cities, representing
the time zones in which they are located.

1. Africa 4. Australia 7. Atlantic 10. Pacific 13. Etc
2. America 5. Arctic 8. Europe 11. SystemV
3. Antarctica 6. Asia 9. Indian 12. US
Geographic area: 6

After I enter 6, nothing going on.

Some research, I need to turn off interactive input.

So, the Dockerfile should add
ENV DEBIAN_FRONTEND noninteractive

FROM ubuntu

RUN apt-get update
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get install -y apache2
RUN apt-get clean

#ENTRYPOINT ["/usr/sbin/apache2", "-k", "start"]

#ENV APACHE_RUN_USER www-data
#ENV APACHE_RUN_GROUP www-data
#NEV APACHE_LOG_DIR /var/log/apache2

EXPOSE 80
CMD apachectl -D FOREGROUND




Monday, April 27, 2020

docker cheat sheet

Check current version
docker --version

Pull from image and run
docker run hello-world

Download from image
docker image ls
   
List running containers
docker container ls
docker ps 
 
List all containers
docker container ls -all
docker ps -a
Stop a container
docker container stop [container name]

Remove container
docker container rm [container name]

Docker

Looking at the installation script.
What is it in each line?


d:\dvp>docker run --detach --publish 80:80 --name webserver nginx
Unable to find image 'nginx:latest' locally
latest: Pulling from library/nginx
54fec2fa59d0: Pull complete
4ede6f09aefe: Pull complete
f9dc69acb465: Pull complete
Digest: sha256:86ae264c3f4acb99b2dee4d0098c40cb8c46dcf9e1148f05d3a51c4df6758c12
Status: Downloaded newer image for nginx:latest
dd95cada14d2df693d80030e68a644d3f7f7633d8c79e93fa2eb46c0a799ad2a