Skip to content

Tag: docker

Trying to supply PGPASS to Docker Image

New to Docker here. I’m trying to create a basic Dockerfile where I run a python script that runs some queries in postgres through psycopg2. I currently have a pgpass file setup in my environment variables so that I can run these tools without supplying a password in the code. I’m trying to replic…

How to test Docker container on another machine?

I wrote a simple script as follows: I dockerized it and put it in a container, and ran it from there. Everything is working fine. I have another machine with Linux OS. How can I test this container there? Do I need to simply copy paste it or what? Answer You need to install Docker on the other machine, and

Using bind mount in Docker (Ubuntu 20.04)

I am really new to Linux and Docker, and i want to not rebuild docker image after every change of my code. I read, that you can use bind mount, but i can’t understand it’s syntax and usage. My Python files with Dockerfile is located at /etc/python-docker Answer You can mount your python files insi…