Docker Debian and python base58

I have this Docker image FROM debian RUN apt-get update \ && apt-get install -y \ autoconf \ build-essential \ bc \ curl \ git \ wget \ jq \ libssl-dev \ libtool \ net-tools \ openssl \ python3-pip \ pkg-config \ procps \ sed \ vim \ xxd \ ca-certificates \ gnupg \ dc… Read More Docker Debian and python base58

DJango and Docker: db shutting down and web service not accepting connections

I have a problem with Docker. I am trying to build a docker postgres DB and web service for a DJango app. Here is my config: Dockerfile: # syntax=docker/dockerfile:1 FROM python:3 ENV PYTHONDONTWRITEBYTECODE=1 ENV PYTHONUNBUFFERED=1 WORKDIR /code COPY requirements.txt /code/ RUN pip install -r requirements.txt COPY . /code/ docker-compose.yml: services: db: image: postgres volumes: -… Read More DJango and Docker: db shutting down and web service not accepting connections

Cannot reach Spring boot application in Docker

I have a Eureka Discovery Service build with Spring Boot 3. I created Dockerfile file with following content: FROM mcr.microsoft.com/openjdk/jdk:17-ubuntu RUN addgroup –system spring RUN adduser –system spring USER spring:spring ARG JAR_FILE=target/*.jar COPY ${JAR_FILE} app.jar ENTRYPOINT ["java","-jar","/app.jar"] EXPOSE 8880:8880 When I do docker ps I could see the app: $ docker ps CONTAINER ID IMAGE… Read More Cannot reach Spring boot application in Docker

Unable to connect to Postgres Docker Conatiner From Application Server

I have a postgres image running my database and I run this as a Docker container and I can connect to it from psql, but when I connect to it from my application server, I get the following error: org.postgresql.util.PSQLException: Connection to localhost:5432 refused. Check that the hostname and port are correct and that the… Read More Unable to connect to Postgres Docker Conatiner From Application Server

Connect application with database on host system and expose the application on a port

I have installed MariaDB on Ubuntu (not as a Docker image). Then I have an image with a Spring Boot Application. This Spring Boot application should be reachable on port 8002 and be able to connect to MariaDB on the host system. If I start docker run without –network=host, the Spring Boot application in the… Read More Connect application with database on host system and expose the application on a port

docker non-root user volumes creates directories the non-root user has no permission to view that

I can run docker run … as a non-root user (let’s call it pg) and it works, but the issue is something like this: docker run -d -v /home/pg/pg/:/var/lib/postgresql/data/ postgres This creates a directory for volume like this: drwx—— 19 70 root 4096 Jun 19 20:53 pg/ in which case, the pg user cannot access… Read More docker non-root user volumes creates directories the non-root user has no permission to view that

Why do we have to specify -i when starting an interactive docker container but not the -t?

I use docker as part of my education and we start containers with Linux images with the -i flag. Why do I not have to specify the -t flag when starting a container, but I have to specify both -i and -t when creating a new container with the run command? as in: docker start… Read More Why do we have to specify -i when starting an interactive docker container but not the -t?