Building docker image and running container using docker-compose
docker-compose.yml
version: ‘3’
services:
ubuntuwebserver:
build: ../apache2docker/
image: “dockcompose/apache2:1.0”
container_name: dockercomposeapache2
ports:
– “3308:80”
Dockerfile
FROM ubuntu:latest
RUN apt-get update
RUN apt-get install -y openssh-server
RUN mkdir -p /var/run/sshd
RUN mkdir -p /home/dockertest
RUN useradd -d /home/dockertest dockertest
RUN chown dockertest /home/dockertest
RUN echo ‘dockertest:[email protected]$$w0rd’ | chpasswd
RUN sed -i ‘s/PermitRootLogin prohibit-password/PermitRootLogin yes/’ /etc/ssh/sshd_config
EXPOSE 22
CMD [“/usr/sbin/sshd” , “-D”]
Subscribe this channel to get periodic update
Please click this link to subscribe my channel – https://www.youtube.com/c/hadoopengineering/?sub_confirmation=1
Please visit these play lists as well
Docker Fundamentals – https://www.youtube.com/watch?v=ZaCue0XsXUI&list=PLY-V_O-O7h4eL8Efnheizd8RTv_snEoOB
Linux Basics – https://www.youtube.com/watch?v=OSyvTkkLGgs&list=PLY-V_O-O7h4cgwvKtlWtDvCPWO0oqh4IM
Linux Tips and Tricks – https://www.youtube.com/watch?v=e0Bi2IDeySo&list=PLY-V_O-O7h4d9b20j7cEuwzHAJ4Z4SgYZ
Cloudera Hadoop Administration – https://www.youtube.com/watch?v=DjdhZlTGukg&list=PLY-V_O-O7h4dUA5A2E-w_Jd4J4ks27_9v
Cloudera Hadoop 6 – https://www.youtube.com/watch?v=9C4p2ffqtAQ&list=PLY-V_O-O7h4eBLQTjl9eOqlyfKfeVdd_x
Bash Scripting – https://www.youtube.com/watch?v=UqAGoneXGJ8&list=PLY-V_O-O7h4fVhpsvXWjTeGYAHjJAdx1b
Hortonworks Data Platform3 – https://www.youtube.com/watch?v=JXgRu9vw9so&list=PLY-V_O-O7h4eCkKpb6ambmlYf8eEZ2d83
Hadoop Admin Q&A – https://www.youtube.com/watch?v=OGIKKvCdakM&list=PLY-V_O-O7h4c-kiIvx9Ld6raOLU6G5–i
Hadoop Security – https://www.youtube.com/watch?v=tJeLOVaVqjk&list=PLY-V_O-O7h4fHTSxNCipvqfOvFCa-6f07
HD Insight – https://www.youtube.com/watch?v=fi_8DQM5tA4&list=PLY-V_O-O7h4eGzGAJIrjOh1cFyRRav172
HDP Administration – https://www.youtube.com/watch?v=_T4Ktq6yZ3Q&list=PLY-V_O-O7h4dwTtMk77X6JO-AcENbSBr_
HDPCA – https://www.youtube.com/watch?v=s1eA0O2SC8A&list=PLY-V_O-O7h4dabIDNXkBTAbVSvQvmJZmg
Cloudera Certified Administrator – https://www.youtube.com/watch?v=0QrXYZEXeB8&list=PLY-V_O-O7h4e4cib3_Mhdeazzr_Iu1nFh
HDP Upgrade – https://www.youtube.com/watch?v=XFJwrmGNMzU&list=PLY-V_O-O7h4eIwazVbG0chhDugicNmyh-
Puppet – https://www.youtube.com/watch?v=cVbTzjB6W-8&list=PLY-V_O-O7h4e8zwmRjuQalNhUwWHrJYNe
Data Governance – https://www.youtube.com/watch?v=BuCgnhCVUqw&list=PLY-V_O-O7h4fDUKXepXlAwvSGBmAlwr_V
source
Is it possible to recover the old container which got removed during upgrade ..that upgrade is not successful too
very helpful to understand difference between Dockerfile & docker compose. No where else its explained so nicely as you did. Thanks.
It's very helpful video.. thanks bro
getting warning & error — any clue?
Successfully tagged dockercompose/discoveryserver:0.0.1-SNAPSHOT
WARNING: Image for service discoveryserver was built because it did not already exist. To rebuild this image you must use `docker-compose build` or `docker-compose up –build`.
Recreating 2150e863462a_compose_discoveryserver_1 … error
ERROR: for discoveryserver no such image: sha256:e792743d82816ba4d2642d097e01c5aa02d8d213ff823aa40428a787cc8cdcb3: No such image: sha256:e792743d82816ba4d2642d097e01c5aa02d8d213ff823aa40428a787cc8cdcb3
ERROR: The image for the service you're trying to recreate has been removed. If you continue, volume data could be lost. Consider backing up your data before continuing.