Build me a dockerfile
Budget: $10 – $15 USD
I have a Spring Boot application that uses CPD4J to enter a page and test so it works when I "simulate" that I am a user from different countries.
I can run it locally but have not understand how to do it in docker container.
From what I understand I will have to install Chrome so I guess it will have to use debian, alpine or something similar.
I have a docker-compose file that looks like this that works for me to run other application not using CDP4J.
-------------------------------------------------------------------------------
version: '3'
networks:
default:
external:
name: kafka_custom_kafka
services:
pagetesterOne:
image: pagetester:0.0.1-SNAPSHOT
container_name: pagetester
restart: always
environment:
SERVER_PORT: 8081
NAME_WORKER: pagetesterOne
DB_IP: 172.20.0.5
KAFKA_IP: 172.20.0.3
depends_on:
- vpn1
network_mode: service:vpn1
vpn1:
image: azinchen/nordvpn:latest
container_name: vpn1
cap_add:
- net_admin
devices:
- /dev/net/tun
environment:
- USER=user
- PASS=userpas
- COUNTRY=Spain
- GROUP=Standard VPN servers
- RANDOM_TOP=10
- OPENVPN_OPTS=--mute-replay-warnings
ports:
- 8081:81
restart: unless-stopped
-------------------------------------------------------------------------------
So I need help to make sure that the pagetesterOne service will be installed with Chrome that can run headless / not headless in the same container.
I can run it locally but have not understand how to do it in docker container.
From what I understand I will have to install Chrome so I guess it will have to use debian, alpine or something similar.
I have a docker-compose file that looks like this that works for me to run other application not using CDP4J.
-------------------------------------------------------------------------------
version: '3'
networks:
default:
external:
name: kafka_custom_kafka
services:
pagetesterOne:
image: pagetester:0.0.1-SNAPSHOT
container_name: pagetester
restart: always
environment:
SERVER_PORT: 8081
NAME_WORKER: pagetesterOne
DB_IP: 172.20.0.5
KAFKA_IP: 172.20.0.3
depends_on:
- vpn1
network_mode: service:vpn1
vpn1:
image: azinchen/nordvpn:latest
container_name: vpn1
cap_add:
- net_admin
devices:
- /dev/net/tun
environment:
- USER=user
- PASS=userpas
- COUNTRY=Spain
- GROUP=Standard VPN servers
- RANDOM_TOP=10
- OPENVPN_OPTS=--mute-replay-warnings
ports:
- 8081:81
restart: unless-stopped
-------------------------------------------------------------------------------
So I need help to make sure that the pagetesterOne service will be installed with Chrome that can run headless / not headless in the same container.