logo
down
shadow

I develop on Windows and my production is on Linux, how can I do properly the docker-compose file?


I develop on Windows and my production is on Linux, how can I do properly the docker-compose file?

By : Hugo Mendez
Date : November 21 2020, 11:01 PM
With these it helps Actually I have something like that for my development environment on Windows 10 (not the entire file) : , Use relative paths in your docker-compose.yml:
code :
db:
    image: mysql:5.6
    ports:
      - "3307:3306"
    environment:
      - "MYSQL_ROOT_PASSWORD=password"
      - "MYSQL_USER=root"
      - "MYSQL_PASSWORD=password"
      - "MYSQL_DATABASE=simtp"

engine:
    build: ./docker/engine/
    volumes:
        - "./:/var/www/docker:rw"
        - "./docker/engine/php.ini:/usr/local/etc/php/conf.d/custom.ini:ro"
    links:
        - "db:db"
    working_dir: "/var/www/simtp"


Share : facebook icon twitter icon
docker-compose up very slow but docker-compose run on linux very fast

docker-compose up very slow but docker-compose run on linux very fast


By : Ted
Date : March 29 2020, 07:55 AM
To fix the issue you can do As the title said. Docker-Compose is very slow while running a container. It keeps saying it's trying to attach to... when i run "docker-compose up". It takes about 10 minutes before the python script is running. , The issue is because of buffered logs. You should either change
code :
CMD ["/usr/bin/python", "run.py"]
CMD ["/usr/bin/python", "-u", "run.py"]
version: "3"
services:
  docker-build:
    build: ./
    ports:
    - "4242:5000"
    environment:
      - "PYTHONUNBUFFERED=1"
can't find a suitable configuration file in this directory or any docker compose (docker-compose section not getting add

can't find a suitable configuration file in this directory or any docker compose (docker-compose section not getting add


By : user1749148
Date : March 29 2020, 07:55 AM
seems to work fine Not really an expert on VS 2017, but you would need to create a docker-compose.yml file inside of the project.
More information can be found here.
code :
version: '3.5'
services:
  client:
    container_name: WebApplication 
    build:
      dockerfile: Dockerfile
    volumes:
        # Any volumes you would mount goes here
    ports:
        # Ports that need to be mapped from container to host goes here
    environment:
        # Any environment variables
docker-swarm vs.docker-compose on single host in production

docker-swarm vs.docker-compose on single host in production


By : user3383066
Date : March 29 2020, 07:55 AM
hop of those help? Docker Swarm and Docker Compose are fundamentally different animals. Compose is a build tool that lets you define and configure a group of related containers, whereas swarm is an orchestration tool that manages multiple docker engines in a way that lets you treat them (somewhat) as a single unit. Swarm exposes an API that is mostly compatible with the Docker Remote API, which allows existing applications to use Swarm to scale horizontally without having to completely overhaul the existing interface to the container engine.
That said, much of the functionality in Docker Compose that overlaps with Docker Swarm has been added incrementally. Compose has grown over time, and the distinction between the two has narrowed a bit. Swarm was eventually integrated into the Docker engine, and Docker Stack was introduced, allowing compose.yml files to be read directly by Docker, without using Compose.
Docker Compose (docker-compose) couldn't connect to docker daemon on Windows Server 2016 TP5

Docker Compose (docker-compose) couldn't connect to docker daemon on Windows Server 2016 TP5


By : Sunita Programmer
Date : March 29 2020, 07:55 AM
fixed the issue. Will look into that further I am trying to get docker-compose to work on Windows Server 2016 TP5. I have installed Docker Desktop for Windows (not Docker Toolbox) as a service, which works perfectly. I have downloaded the latest docker-compose for windows from https://dl.bintray.com/docker-compose/master/ and put it in the same path as Docker (after unblocking the downloaded file, and renaming it to docker-compose.exe. , You might want to try to set your DOCKER_HOST:
How to use docker-compose yml file for production?

How to use docker-compose yml file for production?


By : Merlyn Bendanillo
Date : March 29 2020, 07:55 AM
This might help you I have a docker application on my localhost which works fine. I am running PHP, Nginx and Mariadb on it. , Suggest you to use Multiple Compose files:
code :
web:
  image: example/my_web_app:latest
web:
  ports:
    - 80:80
db:
  image: your_maridb_image_name:your_maridb_image_version
  networks:
    - default
db:
  build:
    context: ./mariadb
  ports:
    - "xxx:xxx"
db:
  otheroptions_special_for_prod_just_a_example: xxx
db:
  image: your_maridb_image_name:your_maridb_image_version
  networks:
    - default
  build:
    context: ./mariadb
  ports:
    - "xxx:xxx"
db:
  image: your_maridb_image_name:your_maridb_image_version
  networks:
    - default
  otheroptions_special_for_prod_just_a_example: xxx
Related Posts Related Posts :
  • Which keys are returned by ToAscii as a two characters length string?
  • Limiting number of Cores using msconfig
  • Limit number of batch files launched by FOR loop
  • Symfony 2 fresh windows install - web folder permissions issue
  • Why are batch files considered to be a threat
  • bat file to move folders and files from one location to another
  • Running go install results in error
  • GitLab runner only executing one command
  • The FOR command fails to work (only in case if it used without recursive key)
  • Is it possible to write a small (5 line - or more) batch file in the Windows Command Line?
  • RobotFramework: SikuliLibrary: Set Ocr Text Read, Get text keyword not working
  • Trying to open programs with bat file but always comes back invalid
  • Start a Windows service from a batch script and take appropriate action based on result
  • Windows kernel conditional breakpoint not evaluating
  • BAT that retrieves IP and pads 0's
  • Making console window invisible ruins the program
  • How to delete a file that is giving the error "Access is denied" despite running powershell as administrator?
  • How do you show the full directory in Fish when using Bash on Windows?
  • Unity build to UWP: Windows app cert kit
  • How to install GLUT on Anaconda on Windows?
  • How to get USB device name through windows Command Prompt or PowerShell
  • How to generate Windows complete memory dump correctly?
  • shadow
    Privacy Policy - Terms - Contact Us © soohba.com