Category : shell

I have built my docker image using the commands below,and it worked fine : docker build -t react-app . docker run -e CHOKIDAR_USEPOLLING=true -v ${pwd}/src:/app/src –name react-app-dev –rm -p 3000:3000 -it react-app After that,I created a shell script,and used Git Bash to run "sh docker.sh",I got a docker image,but there is no container,although the shell ..

Read more

I am trying to schedule a cron job that builds and runs a docker container that contains a python script. My crontab: * * * * * ~/Projects/Scrape/scrapeScript.sh >> /Users/myName/Projects/scrape/text.txt 2>&1 My scrapeScript.sh: docker build -t scraper . docker run scraper The output to my text.txt file says the following: /Users/myName/Projects/Scrape/scrapeScript.sh: line 1: docker: command ..

Read more

I am trying to pass env variables to the container app-name_app-name and it’s failing as follows. I am trying to pass in env variable thru command line, seems like problem is related to the fact I have an equals = sign in my env variable. docker run –env FERNET_KEY=Jo9HlTULeWylXz39Q25v9cqsHx4_7ZDAHlsQPuJiiHY= APP_DB_PASSWORD=gAAAAABhRil3bGI9o_nCmMEf6oJ3cBuMD6y9to6GX05apQp2GO3GPkxrmeOLBfzeKNPPsp_P8vX2tma3EUEM7m5DuI94K84riA== localhost:5000/app-name_app-name docker: invalid reference format: ..

Read more

Have been tearing my hair out… For set up background – I have a docker container running paperless-ng, and am trying to automate backups. I have rsync running, mirroring a folder onto my backup drive. I have a short shell script at /home/user/paperless-backup.sh: #!/bin/sh -i # Paperless backup shell script cd /home/user/paperless-ng docker-compose exec -T ..

Read more

I have a maven java application with application.properties file in resources directory, and I have generated a .jar, and I want to override application.properties file inside .jar from docker environment variables. application.properties: url=myurl Dockerfile: FROM openjdk:8-jdk-alpine COPY target/app.jar app.jar COPY myentrypoint.sh / CMD ["sh", "/myentrypoint.sh"] myentrypoint.sh #!/bin/bash # if the env var URL is not ..

Read more