Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to run this docker-wine image using docker-compose file? #120

Open
gonzalloe opened this issue Nov 26, 2021 · 2 comments
Open

How to run this docker-wine image using docker-compose file? #120

gonzalloe opened this issue Nov 26, 2021 · 2 comments
Labels

Comments

@gonzalloe
Copy link

Hi,
I was trying to build a stack of containers. One of them is the WINE container built using scottyhardy/docker-wine. Everything work great.
But when I /bin/bash inside the WINE container, I can't start or run wine: bash: /usr/bin/wine: No such file or directory.
The strange thing is wine64 work fine there:
image

ls /usr/bin | grep wine wine is installed inside the container, but still file not found:
image

Here is my docker-compose.yaml:

version: '3'
services:

  #PHP Service
  app:
    build:
      context: .
      dockerfile: Dockerfile
    image: my_test/php_debian10
    container_name: app_PTV1
    restart: unless-stopped
    tty: true
    environment:
      APP_ENV: local
      CONTAINER_ROLE: app
      SERVICE_NAME: app
      SERVICE_TAGS: dev
    working_dir: /var/www
    volumes:
      - ./:/var/www
      - ./php/local.ini:/usr/local/etc/php/conf.d/local.ini
    networks:
      - app-network
  
  #Wine
  wine:
    image: scottyhardy/docker-wine
    container_name: wine_PTV1
    tty: true
    restart: always
    entrypoint: /bin/bash
    working_dir: /var/www
    networks:
      - app-network
 
 #Nginx Service
  webserver:
    image: nginx:alpine
    #container_name: webserver
    restart: unless-stopped
    tty: true
    volumes:
      - ./:/var/www
      - ./nginx/conf.d/:/etc/nginx/conf.d/
    networks:
      - app-network
    depends_on:
      - app

  #MySQL Service
  db:
    image: mysql:5.7.22
    container_name: db_PTV1
    restart: unless-stopped
    tty: true
    ports:
      - "3307:3306"
    environment:
      MYSQL_DATABASE: db
      MYSQL_ROOT_PASSWORD: passwrd
      SERVICE_TAGS: dev
      SERVICE_NAME: mysql
    volumes:
      - dbdata:/var/lib/mysql/
      - ./mysql/my.cnf:/etc/mysql/my.cnf
    networks:
      - app-network
 
 #redis
  redis:
    image: redis:4.0
    container_name: redis_PTV1
    ports:
      - '8009:6379'
    volumes:
      - ./data/redis:/data
    networks:
      - app-network

  # Load balancer using HAProxy
  load_balancer:
    image: dockercloud/haproxy
    container_name: load_balancer_PTV1
    links:
        - webserver
    ports:
        - "85:80"
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
    restart: unless-stopped
    networks:
      - app-network

#Docker Networks
networks:
  app-network:
    driver: bridge

#Volumes
volumes:
  dbdata:
    driver: local

Is there any configuration steps I missed? or the env setup needed?

@scottyhardy
Copy link
Owner

Hi @gonzalloe, I've tested with just a portion of your original config:

version: '3'
services:

  #Wine
  wine:
    image: scottyhardy/docker-wine
    container_name: wine_PTV1
    tty: true
    restart: always
    entrypoint: /bin/bash
    working_dir: /var/www

I was able to run wine without any issues:

Scotts-MacBook-Pro:test scottyhardy$ docker-compose up -d
Starting wine_PTV1 ... done
Scotts-MacBook-Pro:test scottyhardy$ docker exec -it wine_PTV1 /bin/bash
root@35ab2d3eee40:/var/www# wine
Usage: wine PROGRAM [ARGUMENTS...]   Run the specified program
       wine --help                   Display this help and exit
       wine --version                Output version information and exit
root@35ab2d3eee40:/var/www# wine --version
wine-6.0.2

I'm not sure if you were perhaps having issues with the particular build of the docker-wine image. I've recently made some updates that may have potentially fixed your problem, so would you mind testing again and let me know if you're still having issues?

@gonzalloe
Copy link
Author

gonzalloe commented May 6, 2022

Sorry for late respond, the issue was solved after I reinstall my server OS. I guess it was some OS installation issues making Wine not working.

Thanks anyway.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants