I’m just getting started with Docker so apologies if I’m doing something stupid! I’m following this YT guide on creating a simple hello world container on AWS EC2 - https://www.youtube.com/watch?v=VRWTtVreEM8
This is my Dockerfile:
FROM unbuntu:18.04
# Install dependencies
RUN apt-get update -y
RUN apt-get install -y apache2
# Install apached and write hello world message
RUN echo "Hello world" > /var/www/index.html
# Configure apache
RUN a2enmod rewrite
RUN chown -R www-data:www-data /var/www
ENV APACHE_RUN_USER www-data
ENV APACHE_RUN_GROUP www-data
ENV APACHE_LOG_DIR /var/log/apache2
EXPOSE 80
CMD ["/usr/sbin/apache2", "-D", "FOREGROUND"]
I’m using the command:
docker build -t hello-world .
But this is failing with the following error:
Sending build context to Docker daemon 9.216kB
Step 1/13 : FROM unbuntu:18.04
pull access denied for unbuntu, repository does not exist or may require 'docker login'
I’ve logged in successfully with docker login
and I’ve also tried setting ARGuments in the Dockerfile but nothing seems to work.
Can anyone help? like I said, I’m probabaly doing something stupid!