Looking for feedback/review on my project starter template (DRF + Nuxt + Docker compose)
GitHub - pcouy/drf-nuxt-template: An opinionated Django project template including DRF for the back-end, Nuxt for the front-end and docker-compose files
https://github.com/pcouy/drf-nuxt-template
An opinionated Django project template including DRF for the back-end, Nuxt for the front-end and docker-compose files - pcouy/drf-nuxt-template
Is it possible to create a volume that is a file, not a directory?
I am trying to make a simple structured nginx instance with docker. Using this command below to create the container...
docker container create -v ./nginx.conf:/etc/nginx/conf.d/nginx.conf -v .:/app/ -p 80:80 docker.io/nginx
And this is the file structure of it...
- www
-------------- public
---------------------------- index.html
- nginx.conf
And this is the nginx.conf
server {
server_name localhost;
listen 80;
root /app/www/public;
index index.html index.htm;
autoindex on;
}
However the index.html will not work when I go to the localhost.
When I change the docker command to this it does work however, but this will also mirror all of the files and folder from my file structure into the containers /etc/nginx/conf.d/ directory
docker container create -v .:/etc/nginx/conf.d/ -v .:/app/ -p 80:80 docker.io/nginx
Effective Coding with Java Observability
Effective Coding with Java Observability Digma
https://digma.ai/blog/coding-with-java-observability/
Learn how to implement and use observability when coding in Java. Discover how to effectively code with observability in java.
See 2-10x Faster File Operation Speeds with Synchronized File Shares in Docker Desktop
See 2-10x Faster File Operation Speeds with Synchronized File Shares in Docker Desktop
https://www.docker.com/blog/announcing-synchronized-file-shares/
Learn about the latest Docker Desktop feature, synchronized file shares, which provides native file system performance, improving file operation speeds by 2-10x.
Streamline Dockerization with Docker Init GA
https://www.docker.com/blog/streamline-dockerization-with-docker-init-ga/
The Docker team announces the general availability of docker init, with support for multiple languages and stacks, making it simpler than ever to containerize your applications.
I am looking for something that can take a Dockerfile, like the following as an input:
FROM --platform=linux/amd64 debian:latest
ENV DEBIAN_FRONTEND=noninteractive
RUN apt update && apt install -y curl unzip libsecret-1-0 jq
COPY entrypoint.sh .
ENTRYPOINT [ "/entrypoint.sh" ]
And produce a a multi-stage Dockerfile where the last stage is built from scratch
, with the dependencies for the script in the ENTRYPOINT (or CMD) copied over, like this:
FROM --platform=linux/amd64 debian:latest as builder
ENV DEBIAN_FRONTEND=noninteractive
RUN apt update && apt install -y curl unzip libsecret-1-0 jq
FROM --platform=linux/amd64 scratch as app
SHELL ["/bin/bash"]
# the binaries executed in entrypoint.sh
COPY --from=builder /bin/bash /bin/bash
COPY --from=builder /usr/bin/curl /usr/bin/curl
COPY --from=builder /usr/bin/jq /usr/bin/jq
COPY --from=builder /usr/bin/sleep /usr/bin/sleep
# shared libraries of the binaries
COPY --from=builder /lib/x86_64-linux-gnu/libjq.so.1 /lib/x86_64-linux-gnu/libjq.so.1
COPY --from=builder /lib/x86_64-linux-gnu/libcurl.so.4 /lib/x86_64-linux-gnu/libcurl.so.4
COPY --from=builder /lib/x86_64-linux-gnu/libz.so.1 /lib/x86_64-linux-gnu/libz.so.1
# ...a bunch of other shared libs...
# entrypoint
COPY entrypoint.sh /entrypoint.sh
ENTRYPOINT [ "/entrypoint.sh" ]
I've had pretty decent success creating images like this manually (using ldd
to find the dependencies) based on this blog. To my knowledge, there's nothing out there that automates producing an image built from scratch
, specifically. If something like this doesn't exist, I'm willing to build it myself.
Release v25.0.2 · moby/moby
https://github.com/moby/moby/releases/tag/v25.0.2
25.0.2 For a full list of pull requests and changes in this release, refer to the relevant GitHub milestones: docker/cli, 25.0.2 milestone moby/moby, 25.0.2 milestone Security This release contai...
I just installed Immich and while all my other containers have just required me to add to them to existing yaml, Immich requires its own yaml. That's fine I guess, but for the library, I wanna host it on my NAS and so I made the volume in my main Docker-Compose.yaml, the Immich yaml was all like, "what you talking about Willis?" because in my Immich environment I tried to point to something created in my main yaml. I thought I could work around this by adding an empty volume declaration, but now I can't find my uploads 😂 any idea on the correct methodology/workaround?
8 Top Docker Tips & Tricks for 2024
https://www.docker.com/blog/8-top-docker-tips-tricks-for-2024/
Whether you’re a Docker expert or new to the Docker community, you may be wondering about the best ways to optimize or get started quicker on Docker. Docker Captain Vladimir Mikhalev rounds up top Docker tips to help you supercharge developer productivity in 2024.
How did your journey begin? I feel like Docker has been getting mentioned for aeons and I've only just started using it now.