HOW CONTAINERS SUPPORT SERVICE REGISTRATION + DISCOVERY / DOCKER

SIX MSA PATTERNS.
The most common microservice patterns are Message-Oriented, Event-Driven, Isolated State, Replicating State, Fine-Grained (SOA), and Layered APIs.
Web Services and Business Processes were once complicated by the issue of State. By their nature, Business Processes are Stateful, in that changes occur after each step is performed. The moment of each event is measured as the clock ticks. In the early days, Web Services were always Stateless. This was slowly resolved with non-proprietary solutions such as business process Management Notation (BPMN) and Business Process Execution Language (PBEL). Yet, some Web Services execute or expose computing functions and others are executing business processes. In some cases, a clock matters and other cases, it does not.
Kristopher Sandoval sees a reason for people to be confused, noting “stateless services have managed to mirror a lot of the behavior of stateful services without technically crossing the line.” His explains, “When the state is stored by the server, it generates a session. This is stateful computing. When the state is stored by the client, it generates some kind of data that is to be used for various systems — while technically ‘stateful’ in that it references a state, the state is stored by the client so we refer to it as stateless. Sandoval writes for Nordic APIs.
STATEFUL PATTERNS AND EVI.
Traditional system design favors consistent data queries and mutating state, which is not how distributed architectures are designed. To avoid unexpected results or data corruption, a state needs to be explicitly declared or each component needs to be autonomous. Event-driven patterns provide standards to avoid side-effects of explicitly declaring a state. Message-oriented systems use a queue, while event-based also sets and enforces standards to assure that the design and behavior of messages over the queue have a timestamp. A materialized view of the state can be reconstructed by the service receiving it. It can then replay the events in order. This makes the event-based pattern ideal for EVI.
Any pattern that records time stamps is suitable. Therefore, an index of microservices should also attempt to classify whether a Service has a time-stamp, using the input of whether it is stateful as a key predictor. To start, “service discovery” is required. Enterprise Value Integration (EVI) is then able to leverage the inventory of services to track inputs, transformations, and outputs associated with each customer and each process they consume. This is vital to improve profitability, while also delivering more consistently on brand promises.
EVI is the only brand consulting firm in the world to recognize the importance of containers and serverless computing – and consistently re-engineer organizations to deliver more value. 
Docker is one of the leading companies and platforms for developers and sysadmins to develop, ship, and run applications in containers. Docker lets you quickly assemble applications from components and eliminates the friction that can come when shipping code.

DOCKER

Docker has a free open source and paid enterprise versions and is considered a simpler and more flexible container storage platform than Kubernetes. Although it is also open source, it comes from Google and is considered more intricate. Some say overly-complicated. The simplicity of Docker is illustrated through service discovery. As long as the container name is used as hostname, a container can always discover other containers on the same stack. Docker Cloud uses directional links recorded in environment variables to provides a basic service discovery functionality. The complexity of Kubernetes is illustrated through service registration and discovery. Kubernetes is predicated in the idea that a Service is a REST object. This means that a Service definition can be POSTed to the apiserver to create a new instance. Kubernetes offers Endpoints API, which is updated when a Service changes. Google explains, “for non-native applications, Kubernetes offers a virtual-IP-based bridge to Services which redirects to the backend Pods.” A group of containers that deployed together on the same host is a Kubernetes pod. Kubernetes supports domain name servers (DNS) discovery as well as environmental variables. Google strongly recommends the DNS approach.

CONTAINERS (by Docker)

- Ignasi Lopez Luna

Testing applications that incorporate AI can be difficult. In this article, we share a promising new methodology for testing GenAI applications in Java.

- Szymon Stawski

Get started with Signal0ne, a Docker Desktop extension that scans Docker containers' state and logs in search of problems, analyzes the discovered issues, and outputs insights to help developers debug.

- Rebecca Floyd

The most recent Docker State of Application Development Survey results offer insights into how developers are adopting and utilizing AI, reflecting a shift toward more intelligent, efficient, and adaptable development methodologies.

- Kat Tomrushka

In the Docker Desktop 4.29 release, we've embarked on an ambitious journey to elevate the user experience by fundamentally redefining error management. Learn more about this intuitive new prompt that sheds light on the mysterious seas of error messages.

DOCKER (by RedHat)

RSS Error: A feed could not be found at https://developers.redhat.com/blog/tag/docker/feed/. A feed with an invalid mime type may fall victim to this error, or SimplePie was unable to auto-discover it.. Use force_feed() if you are certain this URL is a real feed.

VIRTUAL MACHINES + CONTAINERS (by VMware)

RSS Error: A feed could not be found at https://blogs.vmware.com/vcloud/feed. A feed with an invalid mime type may fall victim to this error, or SimplePie was unable to auto-discover it.. Use force_feed() if you are certain this URL is a real feed.

DOCKER (by Reddit)

- /u/Zealousideal_Box3197

Hello together,

I want to build a deploy pipeline and my docker login always fails.

I have portainer running on my server on port 9443 and i can access it from my client in the browser by using "https://mydomain:9443" the ssl certificate from let's encrypt is also accepted but is only valid for mydomain and not myip.

However when i try "docker login https://mydomain:9443" i get the error:

Error response from daemon: login attempt to https://mydomain:9443/v2/ failed with status: 404 Not Found

I don't know why docker adds the /v2/ at the end of the url. My docker version is 24.0.5.

For my DNS:

I have an A-Type Entry that links to mydomain and this works fine.

I have also created a subdomain portainer.mydomain that should later with the help of nginx link to port 9443. But the DNS-Propagation has not finished yet, this is why i'm currently trying the docker login with mydomain:9443 instead of just using my subdomain for portainer.

So far I have not set up any nginx server. So there is no service running on port 80 or 443.

If you need more information, please let me know.

Thanks in advance for any help.

submitted by /u/Zealousideal_Box3197 [link] [comments]

- /u/Internal_Researcher8

I have a RasPi5 with Docker and Docker-Compose installed. I want to use docker-mailserver locally (not exposed to the internet). When looking through the documentation for the mailserver, it all seems to assume it will be exposed to the public and that public DNS servers will point to it.

All I have right now is an IP address. So within the docker-compose file, I'm confused as to what I should enter for the HOSTNAME.

For the time being, this is more of a learning exercise but eventually, I want to have this retrieve mail from my remote mail server and my email clients (K9 Mail on my phone and Thunderbird on my laptop) will connect to this mail server to retrieve email messages. For a couple of decades, I've used a shared (cPanel) webhosting service. It works very well. But I'm running into storage issues.

I want to get around that by hosting the email locally (I've got a 1TB nvme drive installed on the RasPi5) while not exposing the mail server to the internet. I will continue to use the webhost for outgoing messages bypassing the local mail server completely for outgoing messages. This should avoid the issue of self-hosted email servers getting tagged as spam senders.

EDIT: I have pfSense running as my router. So I decided to add a DNS entry in the DNS Resolver. That points to my RasPi's IP address. So I entered that FQDN (mail.home.arpa) as the Hostname in the compose.yaml file.

When I run docker compose up, it exits with one of two error codes: on one attempt, it throws error 159. When I try again, it throws error 0. :(

ALSO: I have configured Wireguard so that I'll be able to access it from outside the home network (when I am eventually ready to actually use it) -- I don't intend to EVER have it exposed to the internet.

submitted by /u/Internal_Researcher8 [link] [comments]

- /u/moonfirez91

Need a help with the nginx in my dockerized app

Getting 502 Bad Gateway

In hosts file it is

127.0.0.1 riichi-local.lv

Error itself 2024-04-27 23:15:53 2024/04/27 20:15:53 [error] 28#28: *1 connect() failed (111: Connection refused) while connecting to upstream, client: 172.31.0.1, server: , request: "GET /favicon.ico HTTP/1.1", upstream: "fastcgi://172.31.0.4:9000", host: "riichi-local.lv", referrer: "http://riichi-local.lv/"

docker-compose.yml

version: '3' services: nginx: image: nginx:latest ports: - "80:80" volumes: - ./nginx.conf:/etc/nginx/conf.d/default.conf - ./:/app php: build: ./ environment: PHP_IDE_CONFIG: "serverName=riichi" volumes: - ./:/app - ./xdebug.ini:/usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini command: bash -c "composer install && npm install && npm run watch" postgredb: image: postgres:13.3 environment: POSTGRES_DB: "riichi" POSTGRES_USER: "root" POSTGRES_PASSWORD: "root" ports: - "5432:5432"

nginx.conf

server { listen 80; root /app/public; index index.php; error_page 404 /index.php; location ~ \.php$ { try_files $uri =404; fastcgi_pass php:9000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; } location / { try_files $uri $uri/ /index.php?$query_string; } } server { listen 80; root /app/public; index index.php; error_page 404 /index.php; location ~ \.php$ { try_files $uri =404; fastcgi_pass php:9000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; } location / { try_files $uri $uri/ /index.php?$query_string; } }

Dockerfile

FROM php:8.1-fpm WORKDIR /app RUN apt-get update RUN apt-get update && \ apt-get install nano zip libpq-dev unzip wget git locales locales-all libcurl4-openssl-dev libjpeg-dev libpng-dev libzip-dev pkg-config libssl-dev -y && \ docker-php-ext-install pdo pdo_pgsql pgsql RUN docker-php-ext-configure gd \ && docker-php-ext-install gd \ && docker-php-ext-enable gd RUN docker-php-ext-configure zip \ && docker-php-ext-install zip RUN curl -sL https://getcomposer.org/installer | php -- --install-dir /usr/bin --filename composer RUN pecl install xdebug RUN curl -sL https://deb.nodesource.com/setup_20.x | bash - \ && apt-get install -y nodejs \ && npm install -g yarn CMD ["php-fpm"] submitted by /u/moonfirez91 [link] [comments]

- /u/hweb47

Hi everyone. I'm trying to get started with learning Docker but I'm getting confused about where exactly Docker is installed and containers are run. Am I correct in thinking Docker can be installed on an OS like Ubuntu and then something else like portainer needs to be run to manage the containers?

I have installed proxmox and can see that containers can be created there as well. What's the most practical approach? My intention is to run things like pi-hole, bookstack for a home lab. TIA

submitted by /u/hweb47 [link] [comments]

- /u/danielrosehill

Use-case:

Am interested in building out a couple of projects that can be run as Docker containers.

I would like to provision one server explicitly to manage the Docker containers on the servers hosting the applications (ie, the "environments."). The other servers (ie, "nodes" in Kubernetes lingo) would be servers running Docker which I can manage remotely from the central control server.

Re: Kubernetes - the apps are MVP type proof of concept things and I think that Kubernetes brings too much complication to the table.

So far I've found Portainer and quite like it but am keeping my eyes open for other tools that are intended for this kind of use case (a lot of people seem to like the idea of running their "orchestrator" locally but for my needs - quite a bit of travel - I think a cloud accessible resource makes more sense).

TIA for any recommendations!

submitted by /u/danielrosehill [link] [comments]

- /u/stave-p

After using Docker for some years, I had to deal with cases such as waiting for multiple services to become available. For example, an API server waiting for a database to become available so it will be able to run the database migrations.

I used to work with bash scripts such as wait-for-it and wait-for. However, most of them require external dependencies to be installed such as netcat and curl. Also, they only support waiting for a single service.

For this reason, I built a tool that waits for multiple services to become available and requires no external dependencies.

I would appreciate some feedback.

What do you think?

https://github.com/Stavrospanakakis/is\_ready

submitted by /u/stave-p [link] [comments]

- /u/AmodeusR

So I'm having this strange problem, where I do run the docker with the -v flag, but still no update happens, not matter what. So this is the second tutorial I'm watching for Docker, it teaches about using the -v to link in some way the local code with the container code, and I'm running the code below:

docker run -p 5173:5173 -v "$(pwd):/app" -v /app/node_modules react-docker

But it simply doesn't work. Why is that and what am I supposed to actually to do to make this thing work?

If by any chance it's relevant, I'm in a Windows 11 computer using Bash terminal.

submitted by /u/AmodeusR [link] [comments]

- /u/Icy-Reporter-7633

This is a very rudimentary outline of what I want on my home server at the moment:

-Raspberry pi 4

-Linux OS

-Docker

-Portainer for simpler UI

-Pi-Hole with unbound

-Open media vault for home NAS

-Plex that I can VPN into from outside my LAN

I’m asking if anyone could give me guidance on how to learn to set this up? I’ve tried doing it all willy-nilly with YouTube guides. I’ve tried to learn docker through tutorials, but it’s not as helpful and straight forward as I hoped. The networking and configuration of docker containers really confuses me.

I currently have my RBP running all this on Raspbian OS but without a VPN to access my Plex from outside my house, and it’s working. I would ultimately like this more efficient setup with Docker (unless anyone has other suggestions).

I don’t think there’s a straight forward answer to this but I don’t really know where to look. Reddit has been my go to for questions and troubleshooting. If anyone has suggestions on videos or anything please let me know.

I wasn’t exactly sure which community to post this but I decided docker might be the best all things considered.

Thank you!

submitted by /u/Icy-Reporter-7633 [link] [comments]

- /u/RiffyDivine2

Does anyone have a good write up or video on how to setup a coturn server in docker? I have been trying for a few days now without being able to get it to pass any of the tests and I'd welcome some help. Most the stuff I am finding is very old information.

submitted by /u/RiffyDivine2 [link] [comments]

- /u/urosp

Hey everyone, I just wrote a short text demonstrating how you can build your server code and package it into a Docker container wiht one command, using Bazel. Please check out the text here: https://popovicu.com/posts/containers-bazel-one-command/

The containers built are OCI images, so you can use them outside of Docker too.

This is building on top of the text from last week about building Go gRPC servers with similar ease, which you can see here.

I hope it's useful and gives you another tool for building your cool containers!

submitted by /u/urosp [link] [comments]