Click here to Skip to main content
15,868,016 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I have a springboot application which is running well on docker and I am able to access it from the Chrome browser installed on my laptop. But now I want to install a browser(chrome/firefox) on docker so that when I do docker-compose up, then at some port I should be able to access that docker browser and then on that browser I should be able to run my application (which is also running on the docker) instead of accessing that application on the normal browser installed on my laptop.

To achieve this, I have written firefox service in my dockerc-ompose file as



version: "3.8"
volumes:
    firefox-user-management_test:

services:
    mysql-standalone:
        image: mysql:8.0.25
        environment:
            - MYSQL_ROOT_PASSWORD=root123M.
            - MYSQL_DATABASE=usermanagementappdp
        ports:
            - 3306:3306

    phpmyadmin:
        image: phpmyadmin/phpmyadmin
        restart: always
        environment:
            PMA_HOST: mysql-standalone
            PMA_USER: root
            PMA_PASSWORD: root123M.
        ports:
            - 8085:80

    firefox-user-management_test:
        image: ghcr.io/linuxserver/firefox
        container_name: firefox
        environment:
            - PUID=1476623
            - PGID=1049089
        volumes:
            - firefox-user-management_test:/config
        ports:
            - 3456:3000
        shm_size: "1gb"
        restart: unless-stopped
#       build: ./browser

    eureka-server:
        ports:
            - 8761:8761
        build: ../Eureka-Server-For-User-Management-App

    usermanagementapp-docker:
        ports:
            - 8089:8089
        environment:
            EUREKA_CLIENT_SERVICEURL_DEFAULTZONE: http://eureka-server:8761/eureka
            MYSQL_HOST: mysql-standalone
        build: .
        restart: on-failure
        depends_on: [mysql-standalone, eureka-server]
        #entrypoint: app/app.jar





By doing so I am able to access firefox browser on http://localhost:3456/
have no idea how to run my application on this browser. I am trying to access it with 
http://localhost:63342/User-Management-App-UI2/templates/index.html?_ijt=sgikvk36q62np90ujukcedogrt&_ij_reload=RELOAD_ON_SAVE, 
which is the link which I use to access my app from the chrome browser.

Any pointers? Thanks in advance.


What I have tried:

I have written in question what changes I have made in docker-compose file
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900