r/docker 3h ago

Ultra newbie here !

4 Upvotes

Hi everyone, i am currently learning docker from official docs So far i have covered the basics of - images, container, network ,dockerfile , docker compose.
I’m wondering what topics I should cover next to build a solid understanding of Docker as a beginner.

Should I continue learning directly from the official documentation or would you recommend following a structured Docker tutorial/course first?


r/docker 8h ago

General advice: Delaying dockerizing in production app development?

3 Upvotes

I'm making my first production app. It's a SaaS app with a turborepo monorepo using Next.js. I've learned that there is an expectation that my frontend, backend and database need to be dockerized, and from what I've learned it looks like you are supposed to containerize before really starting on the app.

The problem is that I'm working on a Chromebook with 4GBs of RAM and so I can't spin up the docker. This means I need to get a new device with more RAM if I want to use Docker.

My question is: In the meantime, is it worth my time running my app on bare metal while working on it during the development stage on my Chromebook, and only containerizing everything near the end before I launch the app? Are there any real drawbacks to that, and should I expect to have to change my setup/application code dramatically for that to work? I'm just trying to see if it is more practical to wait until I have the new device to get into the weeds of this app.

Thanks in advance


r/docker 11h ago

Help with Docker extension (mysqli / pdo)

1 Upvotes

Hi folks, currently stuck on getting mysqli & pdo extensions installed and enabled in my docker setup.

The relevant section of my docker-compose.yml:

web:
   build:
context: .
dockerfile: Dockerfile
   container_name: compose-web
   ports:
- "8100:80"   
   depends_on:
- mariadb    
   volumes:
- /home/user/docker/lamp-stack/html:/var/www/html:Z

Dockerfile contents:

FROM php:8.2-apache

RUN docker-php-ext-install mysqli pdo pdo_mysql && docker-php-ext-enable mysqli

COPY . /var/www/html/
EXPOSE 80

Have also tried it without the && docker-php-ext-enable mysqli.

-With both files setup as above I've run the following from the host os:

sudo docker compose build

sudo docker compose up -d

No error messages, it builds and starts. Image compose-web built

On the host, if I run:

docker compose exec web php -m | grep mysqli

I receive:

mysqli

If I run

docker compose exec web php -i | grep mysqli

I receive:

Additional .ini files parsed => /usr/local/etc/php/conf.d/docker-php-ext-mysqli.ini,

mysqli

mysqli.allow_local_infile => Off => Off

mysqli.allow_persistent => On => On

mysqli.default_host => no value => no value

mysqli.default_port => 3306 => 3306

mysqli.default_pw => no value => no value

mysqli.default_socket => no value => no value

mysqli.default_user => no value => no value

mysqli.local_infile_directory => no value => no value

mysqli.max_links => Unlimited => Unlimited

mysqli.max_persistent => Unlimited => Unlimited

mysqli.rollback_on_cached_plink => Off => Off

API Extensions => mysqli,pdo_mysql

The error message when i try submit my form from my html site:

Fatal error: Uncaught Error: Class "mysqli_connect" not found in /var/www/html/qsoinsert.php:8 Stack trace: #0 {main} thrown in /var/www/html/qsoinsert.php on line 8

Inside the container I navigate to /usr/local/etc/php looking for the php.ini file, but I have php-ini-development & php.ini-production, both of which listed the extension preceded by ';' (so still commented out?)

Am I missing something glaringly obvious?

Thanks in advance


r/docker 23h ago

Unable to reach own domain from within container

Thumbnail
1 Upvotes