Skip to main content

Posts

Showing posts with the label Docker

Packaging an app with Dockerfile

 Find a better formatted version of this post on Notion ! Share it. Share this too. The more sharing, the better. Packaging the app: ✅ Pushing to DockerHub: ✅ See Error Pushing to Docker Hub below for how I troubleshot the issue! What is my app? A static webpage I had created for fun a few months ago. I knew it would come in handy! What did I do? Used demo static webpage for testing. Created Dockerfile 💡 It should be Dockerfile, no extension. Dockerfile.Dockerfile is incorrect! Used nginx Alpine as server and the following code: FROM scratch as static-site WORKDIR /app COPY . . FROM nginx:1.16.0-alpine as server COPY --from=static-site /app /usr/share/nginx/html EXPOSE 80 CMD [ "nginx", "-g", "daemon off;"] From Mwiza Kumwenda (see resources below). I wondered if I should use "start" in the CMD [ "nginx", "-g", "daemon off;"] list/tuple, but it worked without it. Exposed port 80 Created image;...

Packaging a Static Website with Dockerfile and pushing to DockerHub

 Want to read this with better formatting? Of course you do; Check out the page on Notion !   What's in the image? A simple static webpage I had created for fun a few months ago. I knew it would come in handy! What did I do? Used demo static webpage for testing. Created Dockerfile 💡 It should be Dockerfile, no extension. Dockerfile.Dockerfile is incorrect! Used nginx Alpine as server and the following code:  FROM scratch as static-site  WORKDIR /app  COPY . . [#to same directory] FROM nginx:1.16.0-alpine as server  COPY --from=static-site /app /usr/share/nginx/html  EXPOSE 80 [ #For web access] CMD [ "nginx", "-g", "daemon off;"]   From Mwiza Kumwenda (see resources below).   CMD [ "nginx" , "-g" , "daemon off;" ]       I wondered if I should use "start" in the CMD [ "nginx", "-g", "daemon off;"] list/tuple, but it worked to package the image without it  Actually, push...

Deploying Docker Containers in AWS and Wandering Around Clusters

  Or, at least learning more about each. And self-learning is the important part, right? And welcome back to not only AWS, but Docker as well. This is a bit of an older post, as I have more experience with Terraform's containerized environments in Azure over AWS. Instructions There is a Console First Run Wizard, here . I have an exceedingly vague idea of what this means in full. Cluster is essentially the pack of what you need to run something. Bing (Yes, Bing), says it's a 'logical grouping of tasks or services'. So 'containers' are the 'physical' grouping, if we consider 'physical = code'. We can define a service, which allows us to run and maintain a specified number of simultaneous instances of a task definition. It sounds a little like a limited pool of IP addresses. This is the free tier, AWS only gives us one. The instructions emphasize Elastic Load Balancing...which took me a while to realize and find. And now the...

Server 2016: Multi Interfaces Per NIC (Short); Docker For Windows Server (Longer)

Adding more than one IP address to an interface, just incase said interface is being woefully underused. This is a good way to use avaliable resources. The primary interface is Ethernet, with an Index of 2. There's no need to set the gateway, as these are all in the same subnet. There's also no Windows-Imposed limit. Your only limit is your imagination (and hardware). Although I can add IP addresses, they want me to set up the Server properly before I can finangle with NIC teaming. There are two starter users; Rosanta Galamad and Juke Morrow. The latter is an Administrator. The folder added is a gussied-up test folder. Meanwhile, I pop ahead in the textbook (MSCA 70-740 Cert Guide) to see - A Docker chapter! We can do that! (If we get the internet working properly in the server - What happened?) But we can install it on our host machine. Why not?

Learn Docker in 12 Minutes ��

Docker: With Networking

Now we're going to start an nginx container that's bound to port 80.

Docker: The Whale's Unstuck

So I did want to post that other Docker blog post , and it sat in my drafts for a week, but now I'm happy to show that yes, I did get Docker installed on Xenial; It's the 'get' part of install that seems to be out of fashion these days. So, let's get this tutorial on the road, finally.

Docker: The Whale's Stuck

Docker 1.2 - Words Mean Things Images - The blueprints, make up the basis of containers. [docker pull to get Busybox] Containers - Made from images to run the application [docker run of Busybox image] Daemon - Background service managing running, building, distributing docker containers Client - The Command Line that talks to the daemon, though it can be a GUI. I prefer cmd line. Hub - Registry - Directory - of images. 2.0 - How to Run A Static Website Pull image from Hub Run Container See how to run a webserver Well, mission (sort of) accomplished!

Docker: A Whale of A Time

Docker is another container service like Kubernetes. There are probably more prominent differences, but for now, I see that there is a whale. Though we installed it through the GUI on Mac, we still use it through the good old command line / terminal. We generated that with docker run hello-world, and while at first it gave me an error, it soon found the image from the hub, put the image into a container, and put it onto the bash. Technology is amazing. Here's the tutorial! Let's look at 1.0 - 1.1