Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Jeric Santos
    @gssjericsantos
    I Am Using Terraform Version 0.12.12
    Ryan Tomczik
    @Tomczik76
    I'm following a tutorial that has a few docker containers configured using compose and that are using the link feature to communicate. One of the services in a container is binding to its linked IP to so other containers can connect to it. I would like to connect to that service from my host computer. Does anyone know how to configure that?
    Abhishek K
    @abhishek246
    Yes it very easy remove the ip and give host machine IP.. if you put 127.0.0.1 it has be the lan IP
    Ryan Tomczik
    @Tomczik76
    Remove the IP from where?
    version: '3.7'
    services:
      zookeeper:
        image: debezium/zookeeper:${DEBEZIUM_VERSION}
        ports:
         - 2181:2181
         - 2888:2888
         - 3888:3888
      kafka:
        image: debezium/kafka:${DEBEZIUM_VERSION}
        ports: 
         - 9092:9092
        links:
         - zookeeper
        environment:
         - ZOOKEEPER_CONNECT=zookeeper:2181
         - HOST_NAME=kafka
      mongodb:
        image: debezium/example-mongodb:${DEBEZIUM_VERSION}
        hostname: mongodb
        ports:
         - 27017:27017
        environment:
         - MONGODB_USER=debezium
         - MONGODB_PASSWORD=dbz
      connect:
        image: debezium/connect:${DEBEZIUM_VERSION}
        ports:
         - 8083:8083
        links:
         - kafka
         - mongodb
        environment:
         - BOOTSTRAP_SERVERS=kafka:9092
         - GROUP_ID=1
         - CONFIG_STORAGE_TOPIC=my_connect_configs
         - OFFSET_STORAGE_TOPIC=my_connect_offsets
         - STATUS_STORAGE_TOPIC=my_connect_statuses
    So I want to connect to kafka from my host computer
    but the connect service still needs to connect to it
    Abhishek K
    @abhishek246
    I’m working on CDC what a Coincidence
    Ryan Tomczik
    @Tomczik76
    With Debezium?
    Abhishek K
    @abhishek246
    Yes I’m try to replicate the data from rds to kinesis
    Ryan Tomczik
    @Tomczik76
    I'm need to stream our rds data to our data lake in s3
    Do you know what I need to change in my docker compose file so that I can connect to kafka from my host computer?
    Abhishek K
    @abhishek246
    I’m also experimenting
    Ryan Tomczik
    @Tomczik76
    If I change the HOST_NAME parameter to localhost then I can connect to it from my host computer, but then connect can't connect to it
    Abhishek K
    @abhishek246
    In this case remove the Kafka config from the compose file .. change BOOTSTRAP_SERVERS value to local machine IP 127.0.0.1/local host will not work it has be your local network IP
    Let me know if you have any success in replicating the data
    Ryan Tomczik
    @Tomczik76
    @abhishek246 It worked, but only problem with it is anybody that uses this docker compose file will need to set that ip
    Abhishek K
    @abhishek246
    If they are running in a local machine, Yes they will have to specify the machine IP. If you want to deploy this in production then the value should be Kafka Cluster URL
    Ryan Tomczik
    @Tomczik76
    Hmm actually it doesn't seem to work using the local ip address
    SubhamAshish
    @SubhamAshish

    i am trying to run postgres in windows 10 base OS,

    While mounting its data to file system am facing an error

    docker command used
    ~~

    docker container run --name postgres-dev -p5444:5432 -v //c/subham/dockerdata:/var/lib/postgresql/data -e POSTGRESQL_PASSWORD=admin -it postgres:9.5-alpine
    ~~

    and error is:: data directory /var/lib/postgresql/data has wrong ownership
    does anybody have any idea
    ?
    how to solve this

    help

    rajkiranguvvala
    @rajkiranguvvala
    @SubhamAshish try creating a docker volume and then mount it. docker volume create --name <volume name> -d local. Inside your compose file do this. volumes:
    -volumename created above:/var/lib/postgresql
    volumes:
    Volumename created above
    external: true Let me if that helps
    Muse Mekuria
    @s-u-m-e
    I want to source a script that is in an image when I run a container
    Where would I put the source script.sh ? Putting it in ENTRYPOINT prevents me to start the container interactively
    rajkiranguvvala
    @rajkiranguvvala
    @s-u-m-e bash command at the end of docker run command can make your shell interactive. docker run .... bash -c script.. ; bash let me know if that helps
    Muse Mekuria
    @s-u-m-e
    @rajkiranguvvala I am working off an alpine image that only has sh. Also I wanted to source the script outside of my run command
    Matthew Davis
    @mateothegreat
    pass —entrypoint=sh to docker run
    matrixbot
    @matrixbot
    Stephen D How do I go about debugging a Dockerfile in docker compose?
    Abhishek K
    @abhishek246
    Run the docker image
    Using the bash as the command
    Jeff Dickey
    @jdickey

    @matrixbot you don't even need to change your Dockerfile as long as you have a shell installed in the image used to create a container. With no instance of that container running (but any support containers you need, like database and so on), run

    docker container run -it --rm your/image_name bash

    If your container is meant to expose a port that you want to access during your tests, add the appropriate -p arguments, e.g., -p 3200:8080 to map what's exposed as Port 3200 from your container so it's accessible on your host at Port 8080

    Srinath
    @Srinath-rd
    hello
    kumar Rahul
    @tweet_kum_twitter
    Need help for this command:
    docker build --build-arg PIP_EXTRA_INDEX_URL=${PIP_EXTRA_INDEX_URL} -t ml_api:latest
    I am stuck with this error: Error response from daemon: Cannot locate specified Dockerfile: Dockerfile
    Dockerfile exist in repo. I am beginner to docker and have taken reference of this dockerfile from github repo
    https://github.com/trainindata/deploying-machine-learning-models
    Stephen Chau
    @MrFCow
    @tweet_kum_twitter , first off which folder you are at when you call docker build? You should be at the same level at the Dockerfile? Also there is the context you need to specify I suppose like “docker build <options> .” while the last dot mean using current folder location as context so your Docker file would refer relatively
    Zijing Zhang
    @zzj0402_gitlab
    # docker run -it docker:stable-git sh
    Unable to find image 'docker:stable-git' locally
    stable-git: Pulling from library/docker
    89d9c30c1d48: Already exists 
    8ef94372a977: Already exists 
    1ec62c064901: Already exists 
    e832ee05b41a: Already exists 
    cd554c28095e: Already exists 
    6bbe38466906: Already exists 
    e699fa91a067: Already exists 
    1d05282b0a0e: Pull complete 
    Digest: sha256:8eb35053f63728b0238ba29cd2461de360d0b41e16455294ab8ca23afc225f2a
    Status: Downloaded newer image for docker:stable-git
    / # ls
    bin    dev    home   media  opt    root   sbin   sys    usr
    certs  etc    lib    mnt    proc   run    srv    tmp    var
    / # docker info
    Client:
     Debug Mode: false
    
    Server:
    ERROR: error during connect: Get http://docker:2375/v1.40/info: dial tcp: lookup docker on 130.217.76.1:53: no such host
    errors pretty printing info
    What did I miss? --privilege?
    Genysys
    @Genysys

    Hi,

    I have the following directory and I am trying to pass a volume from my local machine to my container

    FROM parity/parity:stable as notifier
    
    FROM rust:slim as builder
    
    LABEL maintainer="sdare@brave.com"
    
    
    RUN apt-get update -qq && apt-get install build-essential cmake git libudev-dev -qqy && \
        git clone https://github.com/poanetwork/parity-ethereum.git --branch hbbft  && \
        cd parity-ethereum && \
        cargo build --release --features final
    
    
    FROM ubuntu:latest
    
    COPY --from=builder /parity-ethereum/target/release/parity /bin/
    
    ENTRYPOINT ["/bin/parity”]

    Do i need to specify WORKIDR to be able to do this?

    Genysys
    @Genysys
    currently not sure where my application data is although the application seems to be running
    mayank srivastava
    @mighty_1989_twitter
    HI Everyone
    I am trying to mount a network drive on windows container running on windows server 2016
    windows container image is of server core
    when trying do docker run -td --mount type=bind,source=m:\,target=c:\data 8c9 it doesn't work while the same command works well if it is C instead of M:
    any leads will be helpful ..
    i am using docker version 19.03.3
    ecaepp
    @ecaepp
    @mighty_1989_twitter Have you created the drive share in Docker Desktop setting Shared Drives?
    mayank srivastava
    @mighty_1989_twitter
    @ecaepp Thank You