by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    matrixbot
    @matrixbot
    Haley[mt] @Allure Sometimse, if the image is not made correctly, it requires to remove the container to deploy it correctly again as a container.
    Haley[mt] Depends on the running app inside.
    Konstantin Bläsi
    @konstantinblaesi
    @RoniqueRicketts the command is curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
    | is the pipe symbol. command1_with_output | command2_consuming_output . It's a chain of commands consuming each others output
    Ronique Ricketts
    @RoniqueRicketts
    @konstantinblaesi I found the issue. my windows home does not have the correct built so it is failing.
    Konstantin Bläsi
    @konstantinblaesi
    @RoniqueRicketts cool !
    Ronique Ricketts
    @RoniqueRicketts
    So I am currently making a bootable hard drive with ubuntu to see if I can run docker on the external hard drive.
    Renato Marcandier
    @rmarcandier
    Hello guys,Could you help me to figure out what's the best way to achieve this task? I need to design and test a definition that allows easy and consistent deployment of Jenkins server to (Vagrant, OpenStack, AWS, VMWare) DockerFiles are fine. Do you have any example regarding this task?
    robert-brower-impaq
    @robert-brower-impaq

    endpoint A is trying to reach endpoint B using HttpClient. A and B are in separate containers. Each has it's own docker compose. I keep getting "Name or service not known". I think I have tried everything.
    public static IHostBuilder CreateHostBuilder(string[] args) => Host.CreateDefaultBuilder(args) .ConfigureWebHostDefaults(webBuilder => { webBuilder.UseStartup<Startup>().UseUrls(new string[] { "http://0.0.0.0:80", "https://0.0.0.0:443" }); }); ```services:
    taskscheduler:
    environment:

      - ASPNETCORE_ENVIRONMENT=Development
      - ASPNETCORE_URLS=https://0.0.0.0:443;http://0.0.0.0:80``` ```ENTRYPOINT ["dotnet", "TaskScheduler.dll", "--urls http://0.0.0.0:80,https://0.0.0.0:443"]```  In the docker logs for both apps I see ```info: Microsoft.Hosting.Lifetime[0]

    Now listening on: http://0.0.0.0:80

    info: Microsoft.Hosting.Lifetime[0]

    Now listening on: https://0.0.0.0:443

    info: Microsoft.Hosting.Lifetime[0]

    Application started. Press Ctrl+C to shut down.```

    Salathiel Genèse
    @SalathielGenese
    @robert-brower-impaq - Docker --link or docker-compose link (see the docs)
    robert-brower-impaq
    @robert-brower-impaq

    only get:
    ```Sending HTTP request GET https://emailsender/api/emailsender

    fail: TaskScheduler.HostedServices.TaskScheduler[0]

    [TaskScheduler] Name or service not known```

    @SalathielGenese Thanks I will look. But I thought that was just so one container would start another
    Also, from the docs: By default Compose sets up a single network for your app. Each container for a service joins the default network and is both reachable by other containers on that network, and discoverable by them at a hostname identical to the container name.
    That gives me the idea that if I have a rest service running in container emailsender then I can make api requests from another container like so https://emailsender:443/api/sendemail
    robert-brower-impaq
    @robert-brower-impaq
    its the first thing mentioned in the docs: https://docs.docker.com/compose/networking/
    I must be misunderstanding something
    the docs say: by default, any service can reach any other service at that service’s name
    robert-brower-impaq
    @robert-brower-impaq
    if I do docker network create my-network and add that to both docker compose files then I get a different error "The SSL connection could not be established, see inner exception."
    the inner exception indicates bad certificate validation
    Konstantin Bläsi
    @konstantinblaesi
    makes sense if you used self-signed certificates
    robert-brower-impaq
    @robert-brower-impaq
    @konstantinblaesi I tried to get it working by just returning true from the certificate validation callback. nothing I did could get it working.
    Konstantin Bläsi
    @konstantinblaesi
    using self signed certs with aspnet core doesn't sound like a docker issue to me :)
    robert-brower-impaq
    @robert-brower-impaq
    not sure how to get this working. does the ssl error indicate that the container B is reachable from container A?
    in iother words, have I solved my Name or service not known problem?
    Konstantin Bläsi
    @konstantinblaesi
    it looks like that yes
    robert-brower-impaq
    @robert-brower-impaq
    this is like following a trail of breadcrumbs#
    Konstantin Bläsi
    @konstantinblaesi
    dns is resolved to an ip which is then used to esablish the tls encrypted tcp connection. the 2nd part fails
    Salathiel Genèse
    @SalathielGenese
    @robert-brower-impaq - Container dependencies are expressed through depends_on (docker-compose). Container remote hosts are expressed through link.
    robert-brower-impaq
    @robert-brower-impaq
    can you give me a lead on how to solve this? its an asp.net core web app
    Konstantin Bläsi
    @konstantinblaesi
    you can use "docker exec -it your_container_name bash" (assuming linux container and bash installed) to get a shell in the running container
    so you can test things like dns/name resolving outside of your application too
    robert-brower-impaq
    @robert-brower-impaq
    i have already successfully been able to call the rest service using postman in windows
    @konstantinblaesi I'm using the debian linux windows subsystem
    robert-brower-impaq
    @robert-brower-impaq
    but i see what you mean
    rbrower@IPS-CLT45:~$ docker exec -it TaskScheduler bash root@c8f7320b08ac:/app# getent hosts EmailSender 172.20.0.2 EmailSender root@c8f7320b08ac:/app# getent hosts TaskScheduler 172.20.0.3 TaskScheduler root@c8f7320b08ac:/app#
    dns is working. now off to solve this ssl problem.
    not really a networking person but I guess I will be after this
    robert-brower-impaq
    @robert-brower-impaq
    I do not understand this document "How to setup the dev certificate when using Docker in development" dotnet/AspNetCore.Docs#6199 where it says "On your project, open user secrets and add the following configuration keys:"
    where is user secrets?
    I am not sure where to find this config
        "Kestrel":{
            "Certificates":{
                "Default":{
                    "Path":     "/root/.aspnet/https/<AppName>>.pfx",
                    "Password": "<<Your-Password>>"
                }
            }
        }
    }
    robert-brower-impaq
    @robert-brower-impaq
    So I guessed I had to load the kestrel config from the appsettings so I changed my StartUp:
    public void ConfigureServices(IServiceCollection services) { services.Configure<KestrelServerOptions>(Configuration.GetSection("Kestrel"));
    robert-brower-impaq
    @robert-brower-impaq
    I see there is a cert here: "/root/.aspnet/https/EmailSender.pfx". How does one know what the password is?
    when I add the kestrel config as shown above and set the default path as shown I get Interop.Crypto.OpenSslCryptographicException
    HResult=0x23076071
    Message=error:23076071:PKCS12 routines:PKCS12_parse:mac verify failure
    Source=System.Security.Cryptography.X509Certificates
    StackTrace:
    I verified /root/.aspnet/https/EmailSender.pfx exists but I dont know the password because I guess this was automatically generated???
    robert-brower-impaq
    @robert-brower-impaq
    still get the error if I use an empty password
    robert-brower-impaq
    @robert-brower-impaq
    anyone here familiar with getting ssl to work in an asp.net core app in a container?
    Jimmy B.
    @jimmybrancaccio
    Anyone have any suggestions on a script or something that could send me an email or use a webhook to send a notification when a Docker container goes unhealthy?
    Salathiel Genèse
    @SalathielGenese
    @jimmybrancaccio - like a docker plugin ?
    dali546
    @dali546
    hi, am i allowed to ask about buildkit here?
    dali546
    @dali546

    I need assistance as to why my buildkit dockerfile isn't caching even when there are no file changes

    ...
     => CACHED [base 5/5] WORKDIR /app                                  0.0s
     => [build 1/1] RUN --mount=type=cache,id=apk_cache,target=/etc/apk/cache 
          apk add ...                                                   4.3s
     => [release-build 1/5] RUN bundle config ...                       1.9s
     => [release-build 2/5] COPY Gemfile* ./                            0.1s
     => [release-build 3/5] RUN --mount=type=cache,id=bundle_cache,target=/usr/local/bundle/cache ... 133.2s

    So my base gets cached (it only install runtime deps, build install build time deps (for use in development and in release-build step)
    the build stage isn't cached (apk_cache is shared in the build stage and base stage to cache both runtime and buildtime deps)
    the 3/5 on release-build is ALWAYS rebuilt. I'm wondering why this never get's cached as it's really annoying. The unique sizes of my images are massive (accounting for 130mb of bundled gems.
    Any explanation as to why this is happening
    No file changes are happening in between builds (base , build doesn't copy any files, release-build only copies Gemfile and step 4 it copies over the whole app in prep for step 5

    Jimmy B.
    @jimmybrancaccio
    @SalathielGenese I actually think I figured it out for now. Thanks :smile: