by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    ezekel
    @ezekel
        image: mysql
        container_name: mysql-container
        command: --default-authentication-plugin=mysql_native_password
        volumes:
          - ./mysql-data:/var/lib/mysql
        expose:
          - 3306
        ports:
          - "3306:3306"
        environment:
          MYSQL_ROOT_PASSWORD: rootpass
    what should I do?
    ezekel
    @ezekel
    should I up first my containter then add user ?
    Konstantin Bläsi
    @konstantinblaesi
    I would first test without persistence/volumes to ensure there's no state from previous runs
    also I'd recommend changing root pass using MYSQL_ROOT_PASSWORD and setting up a database + user using MYSQL_DATABASE, MYSQL_USER, MYSQL_PASSWORD
    ezekel
    @ezekel
    "I would first test without persistence/volumes to ensure there's no state from previous runs" you mean I will remove the volumes then run dcoker-compse up ?
    Konstantin Bläsi
    @konstantinblaesi
    yes
    changes will be in memory only then
    ezekel
    @ezekel
    ok after docker-compose up, I will add new user ?
    Konstantin Bläsi
    @konstantinblaesi
    I don't know the internals of the mysql image, but if one of the volumes contents has some flag that says "initialized already" worst case your password settings might be skipped
    well you can add users and dbs manually of course but the env variables I mentioned can do it for you
    it's all explained
    ezekel
    @ezekel
    Thank you I will read, sorry just beginner here : )
    Konstantin Bläsi
    @konstantinblaesi
    no problem
    ezekel
    @ezekel
    I'll be back
    ezekel
    @ezekel
    what does restart mean in the directive ?
    db:
    image: mysql
    command: --default-authentication-plugin=mysql_native_password
    restart: always
    environment:
    MYSQL_ROOT_PASSWORD: example
    does it means it will reset the db everytime I use docker-compose up ?
    ezekel
    @ezekel
    I tried to change the mysql username and password via .env but it didnot created
    environment:
    MYSQL_ROOT_PASSWORD: "${DB_ROOT_PASSWORD}"
    MYSQL_DATABASE: "${DB_DATABASE}"
    MYSQL_USER: "${DB_USERNAME}"
    MYSQL_PASSWORD: "${DB_PASSWORD}"
    This message was deleted
    Konstantin Bläsi
    @konstantinblaesi
    restarting the container when it terminated/exited for some reason
    ezekel
    @ezekel
    how do I clean up so that I can create the user via .env ?
    Creating network "firstweb_default" with the default driver
    Creating nginxcontainer ... done
    Creating mysql-container ... done
    Creating php-container ... done
    no more error but still the .env user is not relecting
    this is the content of .env
    MYSQL_ROOT_PASSWORD=rootpass
    MYSQL_DATABASE=dockdb
    MYSQL_USER=myusername
    MYSQL_PASSWORD=mypassword
    Konstantin Bläsi
    @konstantinblaesi
    docker-compose cli has a few commands to stop, cleanup etc https://docs.docker.com/compose/reference/overview/
    ezekel
    @ezekel
    thank you checking
    rebuild services I think
    ezekel
    @ezekel
    docker-compose down -v --rmi all --remove-orphans still no luck
    ezekel
    @ezekel
    woooh still not working my .env is not being read when I use docker-compose up
    ezekel
    @ezekel
    I got it now, I need to remove the exising mysql data
    ezekel
    @ezekel
    Hi guyz I need some help please I pushed my contatiner to heroku but it failed always
    SECURITY WARNING: You are building a Docker image from Windows against a non-Windows Docker host
    ezekel
    @ezekel
    Hi guyz can I ask about my docker-compose my php directive if this is correct, I wonder why I set volumes ang expose ?
    php:
    build: .
    volumes:
      - ./:/var/www/myapp
    container_name: php-container
    expose:
      - 9000
    anybody home ?
    please help me
    Darren Bishop
    @DarrenBishop
    Hi. Anyone know how to change the colour of the BuildKit-enabled docker build output?
    The shade of blue does not show up well on my iterm setup. Just wondering
    ezekel
    @ezekel
    Hello is it ok to ask here some help about deploying container to heroku ?
    matrixbot
    @matrixbot
    darkflib Here's isn't docker... there might be better channels
    darkflib Heroku*
    Anvar Umarov
    @arpanetus
    Why would ADD remove my downloaded files? And If I am about to squash layers via docker-compose how shall I come up?
    Anvar Umarov
    @arpanetus
    ok I got now
    I've been using docker volume for the folder where the all downloaded files stored
    ezekel
    @ezekel

    HI can I ask some help I'm building the image Dockerfile
    but I get this error /bin/sh: apt-get: not found

    Executing busybox-1.31.1-r9.trigger OK: 12 MiB in 31 packages Removing intermediate container 9a28ea5578ed ---> 73b493dcd606 Step 3/7 : RUN apt-get update && apt-get install –y nginx ---> Running in 9e2bb52cd7c8 /bin/sh: apt-get: not found The command '/bin/sh -c apt-get update && apt-get install –y nginx' returned a non-zero code: 127

    Here is my Dockerfile

    `FROM php:7.4-fpm-alpine

    RUN docker-php-ext-install pdo

    RUN docker-php-ext-install pdo_mysql
    RUN apt-get update \
    && apt-get install –y nginx

    COPY index.php /var/www/myapp
    ADD default.conf /etc/nginx/conf.d/default.conf

    EXPOSE 80
    CMD ["nginx", "-g", "daemon off;"]`

    sorry formatting is not helpiing me