Prompt
stringlengths
14
160
Instruction
stringlengths
18
2k
Response
stringlengths
8
2k
Nginx Container: no "ssl_certificate_key" is defined for certificate
I am trying to run a private docker registry using thistutorial. But after I did everything and run the docker-compose, I get the following error from thenginxcontainerno "ssl_certificate_key" is defined for certificate "/home/user/registry/nginx/ssl/key.pem"Here is the registry.conf file:upstream docker-registry { ...
I think you had missed something indocker-composefile. This is working sample we use.nginx: image: "nginx:alpine" ports: - 5000:443 links: - registry:registry volumes: - ./auth:/etc/nginx/conf.d - ./auth/nginx.conf:/etc/nginx/nginx.conf:ro registry: image: registry:2.7.0 volumes: - ./da...
Why is umask setting in dockerfile not working?
I want some directory in my docker to have a specific umask value, say 000. I tried to set that in my dockerfile and in the ENTRYPOINT shell script, but they both failed to work,... RUN umask 000 /var/www/html/storage/logs //the directory ENTRYPOINT ["/etc/start.sh"] #in the /etc/start.sh #!/bin/sh umask 000 /var/www...
The umask is a property of aprocess, not a directory. Like other process-related characteristics, it will get reset at the end of eachRUNcommand.If you're trying to make a directory writeable by a non-root user, the best option is tochownit to that user. (How to set umask for a specific folderon Ask Ubuntu has some f...
Issue with Dockerising Django app using docker-compose
I am new to Docker and I want to dockerise the Django app to run as a container. Followed as below.Here is theDockerfileFROM python:3 ENV PYTHONUNBUFFERED 1 RUN mkdir /code WORKDIR /code COPY requirements.txt /code/ RUN pip install -r requirements.txt COPY . /code/Here isdocker-compose.ymlconfversion: '3' networks: ...
try to edit your Dockerfile like this:FROM python:3 ENV PYTHONUNBUFFERED 1 RUN mkdir /code WORKDIR /code COPY requirements.txt /code/ RUN pip install -r requirements.txt COPY . /code/ CMD ["python", "manage.py", "runserver", "0.0.0.0:8000"]and removecommand: python manage.py runserver 0.0.0.0:8000fromcomposeI assumed t...
NATS with moleculer. How can I change NATS max_payload value?
My problem is that I need to increase max_payload value that NATS receive but I have no idea where I can do it.The project is using Moleculer and NATS is created as a container with docker.When I try to make a request which is bigger than 1MB NATS returns:ERROR - NATS error. 'Maximum Payload ViolationInside dockstation...
You should create aconfiguration filefor NATS. And push it to the container as a Docker volume and set thecommandas-c nats-server.confnats-server.confmax_payload: 4MbStart containerdocker run -d -p 4222:4222 -v ~/nats-server.conf:/nats-server.conf nats -c /nats-server.conf
Share directory or volume with container from host
I have a directory(maybe later volume), that I would like to share with all my interactive containers. I know, that native Docker volumes are stored under/var/lib/docker/volumesanddocker run -vseems the easiest way, but I thinkData Volume Containeris a much more standardized way. I don't know, how to create this volume...
There are two ways to create and share volumes: 1. using theVOLUMEinstruction on theDockerfile. 2 Specifying the-v option during container runtime and later using--volumes-from=with every subsequent container which need to share the data. Here is an ex with the later:Start your first container with-v, then add a test f...
From where/how the files get populated in /var/www/html?
I am learning Docker and trying to understandvolumes. Looking at this example ofwordpress composeand itsdockerfileI don't get which command is responsible for populating wordpress files into/var/www/html.I do see that there isVOLUME /var/www/htmlcommand in the dockerfile to create a mount point.There is command to do...
In this case, theentrypointis copying the files if they don't already exist. Note in the Dockerfile thatthe wordpress source is added to /usr/src/wordpress. Then, when the container starts, the entrypointchecks if some files existand if they don't, itcopies the wordpress source into the current directory, which isWORKD...
How do we run from an intermediary layer with docker buildkit? [duplicate]
I recently heard about Buildkit and have been trying to use it with Docker.I'm usingDOCKER_BUILDKIT=1 docker build . -t experimentalto build my Dockerfile.MyDockerfiledoesn't build properly because of some missing dependant packages.What I want to do is to attach to the last working intermediate container and fix the p...
I think it is not possible at the moment seebuildkit/issue#1472.But BuildKit still caches all layers so you could use a work around.Inspecting the imagebeforethe failingRUNcommand, comment out the failing and all subsequentRUNcommands. Rerundocker buildand then dodocker runto inspect the image.Inspecting the imageafter...
How to pass arguments to Docker container in Kubernetes or OpenShift through command line?
I have a bash script in a Docker image to which I can pass a command line argument throughdocker run(having specified the bash script inENTRYPOINTand a default parameter inCMDlike in thisanswer). So I would run something likedocker run my_docker_test argument_1Now I would like to deploy multiple (ca. 50) containers to ...
The following command should do it:kubectl run my-app --image=my_docker_test -- argument_1
How to disable password or token login on jupyter-notebook with Docker image jupyter/pyspark-notebook
I'm running docker withdocker run -it -p 8888:8888 jupyter/pyspark-notebook/usr/local/bin/start-notebook.sh: running hooks in /usr/local/bin/before-notebook.d /usr/local/bin/start-notebook.sh: running /usr/local/bin/before-notebook.d/spark-config.sh /usr/local/bin/start-notebook.sh: done running hooks in /usr/local/bin...
You can run it with:docker run -it -p 8888:8888 jupyter/pyspark-notebook start.sh jupyter notebook --NotebookApp.token=''assuming you're in a secured environment - see more infohere.
Exporting a container created with docker-compose
I have a series of containers created withdocker-compose. Some of these containers communicate between each other with some rules defined in thedocker-compose.ymlfile.I need to move those containers from aserverAtoserverB(same OS) but i'm having issues in understanding how this works.I tried both with theexportand thes...
2 scenarios:Copy via ssh$ sudo docker save  myImage:tag | ssh user@IPhost:/remote/dir docker load -Copy via scp#Host A $ docker save Image > myImage.tar $ scp myImage.tar IPhostB:/tmp/myImage.tar # Host B $ docker load -i /tmp/myImage.tarAnd then you need to copy the docker-compose.yml to the host B too.The containers ...
Is Hadoop in Docker container faster/worth it? [closed]
Closed. This question isopinion-based. It is not currently accepting answers.Want to improve this question?Update the question so it can be answered with facts and citations byediting this post.Closed8 years ago.Improve this questionI have aHadoopbased environment. I useFlume,HueandCassandrain this system. There is a b...
Is it maybe faster or why is worth it?It sounds like you already have a Hadoop cluster. So you have to ask yourself, how long does it take to reproduce this environment? How often do you need to reproduce this environment?If you are not needing a way to reproduce the environment repeatedly and and contain dependencies ...
Cron does not run in a PHP Docker container
I am using thephp:7.4-fpmDocker image and I'm trying to set up cron to run but it's not running.Here is my Dockerfile:FROM php:7.4-fpm # Set working directory WORKDIR /var/www # Install dependencies RUN apt-get update && apt-get install -y \ cron \ build-essential \ libpng-dev \ libjpeg62-turbo-dev \ ...
So I finally managed to solve it. I have no idea why COPYing the cron file wasn't working. I still don't know why. (maybe someone smarter than me can explain it). But I solved it very simply by appending my commands to the/etc/crontabfile and now it works.P.S.crontab file requires a new line character at the end so usi...
ArangoDB Read timed out (read timeout=60)
I have a problem. I am usingArangoDB enterprise:3.8.6viaDocker. But unfortunately my query takes longer than30s. When it fails, the error isarangodb HTTPConnectionPool(host='127.0.0.1', port=8529): Read timed out. (read timeout=60).My collection is aroung 4GB huge and ~ 1.2 mio - 900k documents inside the collection.Ho...
You can increase the HTTP client'stimeoutby using acustom HTTP clientfor Arango.The default is sethereto 60 seconds.from arango.http import HTTPClient class MyCustomHTTPClient(HTTPClient): REQUEST_TIMEOUT = 1000 # Set the timeout you want in seconds here # Pass an instance of your custom HTTP client to Arango: ...
Dockerized Vue app - hot reload does not work
Dockerized Vue app loads normally to the browser, when applying changes to the code are not reflected without refresh.DockerfileFROM node:14-alpine # make the 'app' folder the current working directory WORKDIR /app # copy 'package.json' COPY package.json . # install project dependencies RUN npm install # copy proje...
After many days I managed to add hot reload by adding in the webpack configuration file this config:devServer: { public: '0.0.0.0:8080' }After digging to the official vue js repo, specifically toserve.jsfile found thepublicoption which:specify the public network URL for the HMR clientIf you do not want to edi...
Run multiple scripts in docker image
Hi i am wondering if it possible to run two scripts in same time automaticly on docker container start . First script have to run client application, and the second run server app as background.
As mentioned having multiple processes is not a suggested practice.Nevertheless, in some scenarios is required to have multiple processes. In those cases the usual approach is to use a process manager likesupervisor.
Kubernetes Autoscaling Containers
is it possible to autoscale docker containers, which contain application servers (like wildfly/tomcat/jetty/) within kubernetes ? For example at cpu & ram use or based on http requests ? If there is a build in feature for that i can't find it, or is it possible to write something like a configuration script for this ? ...
Autoscaling of containers is not yet supported and is not part of the near term1.0 roadmapfor Kubernetes (meaning that the core team isn't going to add it soon but external contributions are certainly welcome).
Dynamically pick the user GUI and UID who's running Docker at the host from entrypoint
I have the following script as the ENTRYPOINT of my Dockerfile and therefore Docker image:#!/bin/bash set -e # Setup permissions data_dir="/var/www/html" usermod -u 1000 www-data && groupmod -g 1000 www-data chown -R www-data:root "$data_dir" if [ -d "$data_dir" ]; then chgrp -R www-data "$data_dir" chmod -...
Your best bet is passing (optional) environment variables to your docker container that can be processed by your startup script.docker-compose.yml:version: '2.1' services: www: image: somenginx environment: - ${UID} - ${GID}Then use the values of$UID/$GIDin your entrypoint script for updating the ...
Docker linking db container with spring boot and get environment variables
I have an springboot application container and mongodb container in docker.docker run -p 27017:27017 -d --name myMongo mongoSo I'm running mongodb container first and after springboot container.docker run -p 8080:8080 --name mySpringApp --link myMongo:mongodb mySpringAppAfter that I want to get that environment variabl...
My advise is to discard the IP inside the environment variables and properties at all.--link myMongo:mongodbLinks myMongo container to host 'mongodb'. This manages docker inside your host config.Now adjust your properties as follows:spring.data.mongodb.host=mongodb spring.data.mongodb.port=27017Now there is no need to ...
Multiple independent mariadb usages: multiple containers or one? Isolation vs efficiency?
I have an architectural question.Suppose we have a system that has multiple sub-systems:A,B, and so on. Each of these sub-system needs to persist their data and they all useMariaDB. Sub-systemAmay need adatabase(as increate database ...) calleda_db; and Sub-systemBmay need a database calledb_db. Furthermore, there a...
Persistent storage in the containerized world is still in its infancy, and can be problematic in high traffic environments when running more than one replica of your database(in this case, mariadb).Running more than one mariadb replica, with shared persistent data storage(e.g. NFS), regardless of the number of database...
autoconf configure warning: /usr/bin/file: No such file or directory
When I use my configure in a ubuntu OS (16), there seems to be no problem. I have installed the autoconf tool and dependencies.When I run the same configure file in a ubuntu (16 or latest) The problems is that I did not install any autotools. I am getting the following error message../configure: line 7022: /usr/bin/fil...
The GNU Build Systemrestricts the featuresthatconfigureis supposed to use for maximum compatibility, including how to write shell code and whichutilitiesare available for use, and features you can expect out of those utilities.fileisnotin that list, and should betested forwithAC_PATH_PROG(or something like that) and so...
docker buildx disable parallel build for multiplatform
I have a docker build that during the build needs to run the server for some admin configuration. By running the server it claims a port and during multi-platform build this conflicts with thedocker buildxcommand as it claims that the port is already in use.Now I would like to run the build sequentially instead of in p...
I've done a bit of research on it now and I have not found a satisfactory answer other than that it does not seem to be possible at this time to disable the parallelism.I did find a workaround that works for me and steps nicely around this issue. I now use actual remote servers to build the target platforms I need.In e...
fail to link redis container to node.js container in docker
I had deployed a simple redis based nodejs application on the digital ocean cloud.Here is the node.js app.var express = require('express'); var app = express(); app.get('/', function(req, res){ res.send('hello world'); }); app.set('trust proxy', 'loopback') app.listen(3000); var redisClient = require('redis').cr...
When you link the redis container to the node container, docker will already modify the hosts file for youYou should then be able to connect to the redis container via:var redisClient = require('redis').createClient(6379,'redis'); // 'redis' is alias for the link -> what's in the hosts file.From:https://docs.docker.com...
Bazel build docker container with local golang module
Let me start by saying I'm new to Bazel. I am trying to build a Docker container from a golang project that contains local module references.First I'm creating a local golang module:go mod init go-exampleHere is the general project structure:. ├── BUILD.bazel ├── WORKSPACE ├── cmd │   └── hello │   ├── BUILD.bazel ...
Figured it out, posting here if anyone else stumbles on this.The answer is simple - you need to embed thego_libraryrule within thego_imagerule. Here is mycmd/hello/BUILD.bazelwhere I also embed the go image in a docker containerload("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library") load("@io_bazel_rules_dock...
How to send HTTP requests to my docker container from localhost?
I'm having trouble making HTTP requests to my docker container (it's a Node.js API that communicates with a Redis database), which runs inside a VM (Docker Toolbox).I've set up my Dockerfile and docker-compose.yml with the desired ports. Built them and ran ("up") them successfully.FROM node:8.15 WORKDIR /redis_server ...
It’s because you have not opened port on host. You may try:version: '3' services: web: build: . ports: - "8080:8080" depends_on: - db db: image: redis ports: - "6379:6379"
I can't run a docker container of my reactjs app
I'm new to Docker and I tried to run a container of thecreate-react-appimage so these are the steps that I have done:npx create-react-app frontendI created aDockerfile.devlike below:FROM node:alpine WORKDIR '/app' COPY package.json . RUN npm install COPY . . CMD ["npm" , "run" , "start"]I used this command to build th...
There is an issue with the version 3.4.1 of react-scripts,So i added a docker-compose file and i specified this line who solve the problem and save my day :stdin_open: trueSo my docker-compose.yml file looks like this :version : '3' services: web: build: context: . dockerfile: Docke...
Create an image from a Dockerfile
I am looking at a Dockerfile like this:FROM microsoft/aspnetcore:2.0 AS base # Install the SSHD server RUN apt-get update \ && apt-get install -y --no-install-recommends openssh-server \ && mkdir -p /run/sshd \ && echo "root:Docker!" | chpasswd #Copy settings file. See elsewhere to find them. COPY sshd_config /...
Since you have a Docker file, you are required to do 4 additional steps:docker build -t .: Building your imagedocker images: Check your imagedocker run -d -p 2222:8080 myapp: Run your imagedocker ps: Check running docker imageReferDocker doc.for more detials
Connecting to Postgres Docker server - authentication failed
I have a PostgreSQL container set up that I can successfully connect to with Adminer but I'm getting an authentication error when trying to connect via something like DBeaver using the same credentials.I have tried exposing port 5432 in the Dockerfile and can see on Windows for docker the port being correctly binded. I...
Check your pg_hba.conf file in the Postgres data folder. The default configuration is that you can only login from localhost (which I assume Adminer is doing) but not from external IPs.In order to allow access from all external addresses vi password authentication, add the following line to your pg_hba.conf:host all...
Pull image from ECR to Kubernetes deployment file
I am facing the issue while pulling the docker image from AWS ECR repository, earlier i usedkubectl create secret docker-registry regcred --docker-server=https://index.docker.io/v1/ --docker-username=kammana --docker-password=[email protected]The deployment YAML fileapiVersion: v1 kind: Pod metadata: name: private-re...
I had the same issue and I use this in a cron:# KUBECTL='kubectl --dry-run=client' KUBECTL='kubectl' ENVIRONMENT=sandbox # yes, typo AWS_DEFAULT_REGION=moon-west-1 EXISTS=$($KUBECTL get secret "$ENVIRONMENT-aws-ecr-$AWS_DEFAULT_REGION" | tail -n 1 | cut -d ' ' -f 1) if [ "$EXISTS" = "$ENVIRONMENT-aws-ecr-$AWS_DEFAULT...
Connecting to a running docker container - differences between using ssh and running a command with "-t -i" parameters
Could you please point me what is the difference between installing openssh-server and starting a ssh session with a given docker container and runningdocker run -t -i ubuntu /bin/bashand then performing some operations. How doesdocker attachcompare to those two methods?
Difference 1. If you want to use ssh, you need to have ssh installed on the Docker image and running on your container. You might not want to because of extra load or from a security perspective. One way to go is to keep your images as small as possible - avoids bugs like heartbleed ;). Whether you want ssh is a point ...
Docker exec - cannot call postgres with environment variables
I have multiple Environment Variables defined on my Postgres container, such as POSTGRES_USER. The container is running and I want to connect to Postgres from the command line using exec.I'm unable to connect with the following:docker exec -it psql -U $POSTGRES_USER -d I understand that the variable is defined on the ...
Depending on your use case, what you could do, instead of passing a user to thepsqlcommand is to define theenvironment variablePGUSERto the container at boot time.This way, it will be the default user for PostgreSQL, if you do not specify any, so you won't even have to specify it in order to connect:$ docker run --name...
What is docker image reference?
Dockerdocumentationmentions image reference in many places. However, runningdocker imagescommand gives the list of images with the following properties: REPOSITORY, TAG, IMAGE ID, CREATED, SIZE - no reference. Is 'reference' a synonym for ID or digest, or something else?
The docker image reference is the combination of the REPOSITORY and TAG in this formatREPOSITORY:TAGwhere they are both separated by:. So if you have an image with a REPOSITORY ofIMAGE1and a tag oflatestthe image reference would beIMAGE1:latest. The knowledge of an image reference would help you to filter by docker im...
Gitlab CI/CD to Digital Ocean for multiple repos using docker-compose
Currently I have a project (repo) in Gitlab which is an angular app. I'm using Gitlab CI/CD to build, test, release and deploy. Releasing will build a new docker image pushing it to the Gitlab registry and after deploying it on NGinx in a docker container on my Digital Ocean droplet. This works fine.Let's say I want to...
According to your comment I understand you'd be interested in adopting amonorepoconfiguration.In this case, for the questionWhere do I manage/put the docker-compose file?you could just put thedocker-compose.ymlfile at the root of your GitLab CI project, which would lead to a directory structure like this:monorepo-proje...
"device or resource busy" error when trying to push image with docker
When pushing to the official registry, I get the following error:Failed to generate layer archive: Error mounting '/dev/mapper/docker-202:1-399203-ed78b67d527d993117331d27627fd622ffb874dc2b439037fb120a45cd3cb9be' on '/var/lib/docker/devicemapper/mnt/ed78b67d527d993117331d27627fd622ffb874dc2b439037fb120a45cd3cb9be': dev...
This looks like it might be related to the issue mentioned here:https://github.com/dotcloud/docker/issues/4767It sounds like you've tried stopping and removing the container. Have you tried restarting the docker daemon and/or restarting the host?
Tensorflow: docker image and -gpu suffix
In the Docker image for Tensorflow with GPU support (for example:tensorflow/tensorflow:2.2.0-gpu) the installed python package istensorflow-gpu(as shown inpip freeze).Installing any python package that depends ontensorflowtriggers the installation of tensorflow itself, although it's already installed under a different ...
You can add an instruction to install a faketensorflow"package" that only writes the metadata without adding the duplicate sources:$ python -c 'from setuptools import setup; setup(name="tensorflow", version="2.2.0")' installIn the docker image this would look like this:FROM tensorflow/tensorflow:2.2.0-gpu RUN python -c...
Azure web app container and docker commands
I'm using the Azure resource "Web app for containers" with a Linux docker image. I would like to use docker commands such as "docker inspect" but I'm not sure how this is possible. Via the Kudo interface this doesn't seem possible. I cannot even get the SHA256 hash of the image currently deployed. All I have is the ini...
The Azure Web app for container is different from the container. It is a web app service when you create it. The difference is that it comes out from a container.So you cannot execute a docker command to a web app. You can execute the command of the web app.For example, if you want to check the container image, the com...
Where are logs of docker nginx conainter stored in host
I usedefault nginx imageand Filebeat to read logs and send them to ELK. Both containers (nginx container and Filebeat container) are on the same host machone.Here is Dockerfile for nginx imageFROM nginx COPY . /usr/share/nginx/html/ EXPOSE 80In my nginx container access log goes toSTDOUTand error log goes toSTDERR.When...
Each container has it's own logfile, you can know where it is by using:docker inspect --format='{{.LogPath}}' It will tell you the path to the logfile.Referencies:https://docs.docker.com/config/containers/logging/json-file/https://docs.docker.com/config/containers/logging/configure/#configure-the-default-logging-driver
Docker multistage build without copying from previous image?
does it have any advantages to use a multistage build in Docker, if you don't copy any files from the previously built image? eg.FROM some_base_image as base #Some random commands RUN mkdir /app RUN mkdir /app2 RUN mkdir /app3 #ETC #Second stage starts from first stage FROM base #Add some files to image COPY foo.txt...
Or are multi stage builds only useful for preparing some files and then copying those into another base image?This is the main use-case discussed in "Use multi-stage builds"The main goal is to reduce the number of layers by copying files from one image to another, without including the build environment needed to prod...
Plotly dash in docker do not load assets
I have a multi-page dash application that works as expected when running it locally with:waitress-serve --listen=0.0.0.0:80 web_app.wsgi:applicationso all the assets within the assets folder loads correctly, the images ar loaded withsrc=app.get_asset_url('xyz.png')and have setapp.css.config.serve_locallytotrue, as show...
Found a solution for the CSS fileshere.app.css.append_css({"external_url": "./assets/xyz.css"})
Files inside a docker image disappear when mounting a volume
Inside of docker image has several files in/tmpdirectory.Example/tmp # ls -al total 4684 drwxrwxrwt 1 root root 4096 May 19 07:09 . drwxr-xr-x 1 root root 4096 May 19 08:13 .. -rw-r--r-- 1 root root 156396 Apr 24 07:12 6359688847463040695.jpg -rw-r--r-- 1 root root ...
From:https://docs.docker.com/storage/bind-mounts/Mount into a non-empty directory on the container If you bind-mount into a non-empty directory on the container, the directory’s existing contents are obscured by the bind mount. This can be beneficial, such as when you want to test a new version of your application with...
How can I pass the variables I have placed in the .env file to the containers in my docker swarm?
I am trying to use the samedocker-compose.ymland.envfiles for bothdocker-composeandswarm. The variables from the.envfile should get parsed, via sed, into a config file by running a run.sh script at boot. This setup works fine when using thedocker-compose upcommand, but they're not getting passed when I use thedocker st...
Actually I found the best/easiest way is to just add this argument to the docker-compose.yml file:env_file: - .env
mapping all available devices in docker-compose
I have a working docker-compose where I now need to bind not only one specific device but all available devices.So instead of having something like:devices - '/dev/serial0:/dev/serial0'I would like to do something like:devices - '/dev:/dev'This gives me the following error:container init caused \"rootfs_linux.go:70...
You can achieve this most easily by running a privileged container: e.g compare:docker run alpine ls -la /devvsdocker run --privileged alpine ls -la /dev
Point different domains to different Docker containers on a single EC2 instance?
I have a simple NodeJS site running inside a Docker container, with its ports mapped to port 80 on the host. I have a domain pointing to the IP of the EC2 instance, and everything is working as expected.If I want to run another, separate NodeJS site from a Docker container on the same instance, how can I map specific d...
You could setup a nginx reverse proxy on the host and bind to seperate ports. The question/and answer on this article explain it quite nicely so I won't repeat it all:https://www.digitalocean.com/community/questions/how-to-bind-multiple-domains-ports-80-and-443-to-docker-contained-applications
Docker - Windows Container Not Resolving Hosts
I have set up two new projects in Visual Studio using the Docker tooling. The first is a asp.net site running against a Linux container. The second is an asp.net site running against a Windows container.In the former, I can ping hostnames (ex: google.com) and it resolves just fine.However, when running the windows con...
I just figured this out. Requires "switching to windows container" in Docker Desktop.1). Follow:https://docs.docker.com/machine/drivers/hyper-v/#example:2). Start hyper v (may need to enable):https://learn.microsoft.com/en-us/virtualization/hyper-v-on-windows/quick-start/enable-hyper-v3). Then in hyper v create externa...
how to run StartAsync connection of signalr blazor client in docker image?
I created default blazor server side app. Then addedMicrosoft.AspNetCore.SignalR.ClientandChatHubclass. Then edited startup.cs file (addservices.AddSignalR()andendpoints.MapHub("/chatHub")) andindex.razorpage. Then run by IIS express. it is okey.Then added docker support and run Docker host. it is not working. Because ...
My best guess is your hub client is trying to connect to "the-public-url-out-of-docker/chatHub":_hubConnection = new HubConnectionBuilder() .WithUrl(NavigationManager.ToAbsoluteUri("/chatHub")) .Build();NavigationManager.ToAbsoluteUri(...)will convert/chatHubto a public url which are exposed to the end ...
How to provide docker image tag dynamically to docker-compose.yml in Azure Release Pipeline Task?
I havedocker-compose.ymlfile present in the repository. I have added the image attribute in one of the services to pull the docker images. I have not hard coded the docker image and docker tag and planning to pass these arguments at the runtime todocker-compose.ymlfile.How to pass the runtime arguments likeIMAGE_TAG=82...
You can use variables in the docker-compose file for the image & tag:version: '3' services: redis-server: image: ${IMAGE_NAME}:${IMAGE_TAG}And pass the arguments in the docker-compose task:You can also define pipeline variables and check the "Settable at release time":So when you click on "Create Release" yo...
Installing python numpy module inside python alpine docker
I am trying to dockerize my python application. Errors are showing inside building Dockerfile and installing dependencies ofscikit-learnie.numpy.DockerfileFROM python:alpine3.8 RUN apk update RUN apk --no-cache add linux-headers gcc g++ COPY . /app WORKDIR /app RUN pip install --upgrade pip RUN pip install --no-cache...
Agree with @senderle comment, Alpine is not the best choice here especially if you plan to use scientific Python packages that relies on numpy. If you absolutely need to use Alpine, you should have a look to other questions likeInstalling numpy on Docker Alpine.Here is a suggestion, I've also replaced theENTRYPOINTbyCM...
OpenJDK 1.8.0_242, MaxRAMFraction setting not reflecting
I am running a Springboot application in the alpine-OpenJDK image and facing OutOfMemory issues. Max heap is being capped at 256MB. I tried updating the MaxRAMFraction setting to 1 but did not see it getting reflected in the Java_process. I have an option to increase the container memory limit to 3000m but would prefer...
Max heap is being capped at 256MB.You mean via-min docker? If such, this isnotthe java heap you are specifying, but the total memory.I tried updating the MaxRAMFraction setting to 1MaxRAMFractionis deprecated and un-used, forget about it.UseCGroupMemoryLimitForHeapis deprecated and will be removed. UseUseContainerSuppo...
making sure a given docker container is running
I'm using docker on quite a lot of servers right now but sometimes some of the containers I use crash due to heavy load. I was thinking on adding a cron that checks every minute of the container is running or not but I didn't find any satisfactory method on doing that.I'm starting the container with a cidfile that save...
The answer is somewhat buried levels deep but I found out multiple ways of doing it starting with the most elegant:Name your container when running it so you can attach to it's process logging and couple that with a process monitor such as upstart/systemd/supervisorddocker run -itd --name=test ubuntuupstart example (/e...
Understanding docker from a layman point of view
I am just one day old to docker , so it is relatively very new to me .I read the docker.io but could not get the answers to few basic questions . Here is what it is:Docker is basically a tool which allows you to make use of the images and spin up your own customised images by installing softwares so that you can use to...
1) What docker is all about from a 10000 ft bird's eye point of view?From the website:Docker is an open-source engine that automates the deployment of any application as a lightweight, portable, self-sufficient container that will run virtually anywhere.Drill down a little bit more and a thorough explanation of the wha...
cant install pip in ubuntu 18.04 docker /bin/sh: 1: pip: not found
I am getting the error using pip in my docker image.FROM ubuntu:18.04 RUN apt-get update && apt-get install -y \ software-properties-common RUN add-apt-repository universe RUN apt-get install -y \ python3.6 \ python3-pip ENV PYTHONUNBUFFERED 1 RUN mkdir /api WORKDIR /api COPY . /api/ RUN pip install pipe...
To runpipfor python3 usepip3, notpip.
relationship between K8S iptables and the one of a container inside a pod
I have enabled the privileged mode in the container and add a rule to it,iptables -N udp2rawDwrW_191630ce_C0 iptables -F udp2rawDwrW_191630ce_C0 iptables -I udp2rawDwrW_191630ce_C0 -j DROP iptables -I INPUT -p tcp -m tcp --dport 4096 -j udp2rawDwrW_191630ce_C0andkt execinto the container and useiptables --table filter ...
if you want to manipulate node's iptables then you definitely need to put the pod on host's network (hostNetwork: truewithin pod'sspec). After that granting to the containerNET_ADMINandNET_RAWcapabilities (incontainers[i].securityContext.capabilities.add) is sufficient. example json slice:"spec": { "hostNetwork": t...
How do I pass a file into a Docker container to be used with the container?
I would like to pass a file from the host system to a container at runtime. I want to run a CLI tool within a container and use the file as an argument to the CLI tool. Is it possible to modify the following command:docker run -it --rm --name to achieve what I want to do. Thedocker cpcommand doesn’t work for what I nee...
I usually use the-v "$PWD:$PWD" -w "$PWD"trick. Run container and volume mount the current host working directory into the container at the same path and set working directory to same path.So for example if I want to transcode a wav file on the host to a mp3 file usig ffmpeg running in a container I would do:docker run...
Debug in VS Code a Node Typescript app running in Docker
I'm running a Node application in Docker, withdocker-compose. I'm using Traefik as a proxy. I would like to be able to debug it in VS Code but I don't manage to connect to my app:connect ECONNREFUSED 127.0.0.1:9229Here are my files:docker-compose.yml:version: '3' services: traefik: image: traefik:1.7 ...
My approach was not good as there is a great tool in VS Code called "Remote development". It's an extension that allows you to attach a container directly in VS Code.First, I had to change the way I start my node app to enable inspecting. As ts-node is not supporting theinspectoption, you have to use this:node --inspec...
I am trying to use docker for php5.6 with ngnix but there is a issue in configuration
Hello I need to setup php5.6 on my local machine. Following are the docker-compose.yml fileversion: '3' networks: laravel: services: nginx: image: nginx:stable-alpine container_name: nginx ports: - "8000:80" volumes: - ./src:/var/www - ./nginx/default.conf:/etc/nginx/conf.d/defau...
To run PHP5.6 with NGINX you will need to do the following:Directory layout. All web files go in your localsrc/directoryFornginx/default.confuse the following:server { listen 80; index index.php index.html; server_name localhost; error_log /var/log/nginx/error.log; access_log /var/log/nginx/access....
Azure Container Instances with blobfuse or Azure Storage Blobs
I'm deploying to azure container instances from the azure container registry (azure cli and/or portal). Azure blobfuse (on ubuntu 18) is giving me the following error:device not found, try 'modprobe fuse' first.The solution to this would be to use the--cap-add=SYS_ADMIN --device /dev/fuseflags when starting the contain...
Unfortunately, it seems it's impossible to mount blobfuse or Azure Blob Storage to Azure Container Instance. There are just four types volume that can be mount to. You can take a look at theAzure Template for Azure Container Instance, it shows the whole property of the ACI. And you can see all the volume objectshere.Ma...
Permissions issue with Docker volumes
I want to start using Docker for my Rails development, so I'm trying to put together askeletonI can use for all my apps.However, I've run into an issue with Docker volumes and permissions.I want to bind-mount the app's directory into the container, so that any changes get propagated to the container without the need to...
I use ahacky solutionto manage this problem for my development environments.To use on development environments only!The images I use for development environments contain a script that looks like this:#!/bin/sh # In usr/local/bin/change-dev-id # Change the "dev" user UID and GID # Retrieve new ids to apply NEWUID=$1 N...
How do I start an AWS Sagemaker training job with GPU access in my docker container?
I have some python code that trains a Neural Network using tensorflow.I've created a docker image based on a tensorflow/tensorflow:latest-gpu-py3 image that runs my python script. When I start an EC2 p2.xlarge instance I can run my docker container using the commanddocker run --runtime=nvidia cnn-userpattern trainand t...
With some help of the AWS support service we were able to find the problem. The docker image I used to run my code on was, as I said tensorflow/tensorflow:latest-gpu-py3 (available onhttps://github.com/aws/sagemaker-tensorflow-container)the "latest" tag refers to version 1.12.0 at this time. The problem was not my own,...
Cannot connect to Azure SQL using an alpine docker image with Python
I have an alpine based docker image, with support for Python, through which I am trying to connect to Azure SQL service. Here is my simple connection code.import pyodbc server = 'blah1.database.windows.net' database = 'mydb1' username = 'myadmin' password = 'XXXXXX' driver= 'ODBC Driver 17 for SQL Server' conn = pyodb...
To confirm setup:apk update && apk add build-base unixodbc-dev freetds-dev pip install pyodbcWhy install both unixodbc and freetds? Pyodbc's pip install requires the packages in unixodbc-dev and the gcc libraries in build-base, so no getting around that. The freetds driver tends to have fewer issues with pyodbc, and is...
File can be uploaded to S3 locally but can't within a container (Unable to locate credential)
I have a Python script to upload a file to S3, the code is the same inthis question.I have a bash script that pass the AWS credential. The file I wanted to upload is generated from a model that running on Fargate (ina container), so I tried to run this Python script within the container to upload to S3, I've built the ...
To pass docker credentials you either need to mount~/.aws/credentialsin your containerdocker -v ~/.aws/credentials:/root/.aws/credentials:roOr pass your credentials as env varsdocker run -e -e AWS_ACCESS_KEY_ID=$(aws configure get aws_access_key_id --profile profilename) -e AWS_SECRET_ACCESS_KEY=$(aws configure get aws...
Docker-compose: how to do version 2 "mem_limit" in version 3?
Recently, I tried upgrading a version2docker-composeyamlfile to version3. Specifically, I was going from 2.1 to 3.4. Usingdocker-composeversion 1.18.0 anddockerversion 18.06.01.The first attempt causeddocker-composeto abort because of the presence of the Version 2 option:mem_limit. Reading theseVersion 3 docs, it cl...
No, there is not.Between versions 2.x and 3.x...several options have been removed...mem_limit,memswap_limit: These have been replaced by the resources key under deploy. deploy configuration only takes effect when using docker stack deploy, and is ignored by docker-compose.SeeCompose: Upgrading from 2 to 3And also you d...
Run commands on create a new Docker container
Is it possible to add instructions likeRUNinDockerfilethat, instead of run ondocker buildcommand, execute when a new container is created withdocker run? I think this can be useful to initialize a volume attached to host file system.
Take a look at theENTRYPOINTcommand. This specifies a command to run when the container starts, regardless of what someone provides as a command on thedocker runcommand line. In fact, it is the job of theENTRYPOINTscript to interpret any command passed todocker run.
Docker - Enable Remote HTTP API with SystemD and "daemon.json"
Disclaimer:On a old machine with Ubuntu 14.04 with Upstart as init system I have enabled the HTTP API by definingDOCKER_OPTSon/etc/default/docker. It works.$ docker version Client: Version: 1.11.2 (...) Server: Version: 1.11.2 (...)Problem:This does solution does not work on a recent machine with Ubuntu ...
With a lot of fragmented documentation it was difficult to solve this.My first solution was to create thedaemon.jsonwith{ "hosts": [ "unix:///var/run/docker.sock", "tcp://127.0.0.1:2376" ] }This does not worked this errordocker[5586]: unable to configure the Docker daemon with file /etc/docker/daemon.jsonaf...
Install an sql dump file to a docker container with mariaDB
I am just learning the basics of docker, but have come stuck on importing an SQl file from the local system. I am on windows 10 and have allowed my docker containers to access my shared drives. I have an SQL file located on D i would like to import to the base image of Maria DB i got from docker hub.I have found a comm...
So after some tweaking and better understanding, i came to the conclusion after testing, that docker-compose is the way to go. So the first folder contains a my.cnf file that does the configuration, then the other folder which @Farhad identified is used to intilize the .sql file.version: "2" services: mariadb_a: ...
Docker. Add dynamic host ip to env var on container
I have a very special scenario. A virtual machine containing some docker containers. One of this containers needs to know the host ip. The problem is if I pass the host ip on container build or using-eon docker run command, it remains "static" (always the same, the one of that moment) on the container.That vm can be on...
I finally solved it. Thank you @yamenk for your answer, it gave me the idea, upvoting.Finally what I did:I created a simple script on host which is getting host ip and writting it into another file.I set that script to be launched on every host boot before docker start.I mapped the file with the ip into the container u...
Dockerize wordpress
Trying to dockerise wordpress I figure out this scenenario:2 data volume containers, one for the database (bbdd) and another for wordpress files (wordpress):sudo docker create -v /var/lib/mysql --name bbdd ubuntu:trusty /bin/true sudo docker create -v /var/www/html --name wordpress ubuntu:trusty /bin/trueThen I need a ...
You need to run the data container for once to make it persistent:sudo docker run -v /var/lib/mysql --name bbdd ubuntu:trusty /bin/true sudo docker run -v /var/www/html --name wordpress ubuntu:trusty /bin/trueThis is an old bug of Docker describedhere. You may be affected if your Docker version is old.
Docker daemon and DNS
I am trying to force the docker daemon to use my DNS server which is binded to bridge0 interface. I have added --dns 172.17.42.1 in my docker_opts but no successDNS server reply ok with dig command:dig @172.17.42.1 registry.service.consul SRV +short 1 1 5000 registry2.node.staging.consul.But pull with this domain fails...
You passed--dns 172.17.42.1to docker_opts, so since that you should be able to resolve the container hostnames from inside other containers.Butobviously you're doingdocker pullfrom the host, not from the container, isn't it? Therefore it's not surprising that you cannot resolve container's hostname from your host, beca...
Creating clock skew with docker
I want to verify the effects of clock skew on a distributed system and the simplest way for me to do that is using multiple docker containers linked together.Can I modify the clocks from individual docker containers so that they are decoupled from the host machine?
I'm not sure that linked answer is entirely appropriate.The simple fact is that containers are just processes: you can't do anything inside a container that you can't do in a normal subprocess. You can muck about with timezones and such, but they are still referencing the same kernel clock as anything else.If you real...
Cannot seem to install Google Cloud Managed VMs
Following Googleinstructions to install managed VMs, everything seems to work smoothly until I get to this step:gcloud preview app setup-managed-vmsThe result is the following error:ERROR: (gcloud.preview.app) Invalid choice: 'setup-managed-vms'.I've made sure all the other dependent components are up to date. The envi...
Yep - that step is no longer required. The docs should be fixed shortly. You might wish to look atMy java App Engine Managed VMs build doesn't deploy after 4/14/2015 updatefor additional info.Our images are now available on the public Google Container registry. For python, you can grab the image at gcr.io/google_appen...
What would prevent code running in a Docker container from connecting to a database on a separate server?
I have a .NET Core 1.1 app running in a Docker container on Ubuntu 14.04, and it fails to connect to the SQL Server database running on a separate server.The error is:Unhandled Exception: System.Data.SqlClient.SqlException: A network-related or instance-specific error occurred while establishing a connection to SQL Ser...
an app running in a container has access to the external network by defaultIt could have access only if a valid IP address is assigned to the container. Sometimes the IP which Docker choose for the container can conflict with external networks.By default, containers run inbridgenetwork, so look at it:docker network ins...
docker run -e not working, bug?
according to thedocs:Additionally, the operator can set any environment variable in the container by using one or more -e flags, even overriding those mentioned above, or already defined by the developer with a Dockerfile ENV. If the operator names an environment variable without specifying a value, then the cu...
Try:docker run -d -it -e "myvar=blah" myimage123The problem here is that-eis a flag andmyimage123is an argument. So the arguments should always come after the flags.
swift "print" doesn't appear in STDOut but 3rd party c library logs do when running in docker on ECS
So locally when in dev throughxcodeor compiled withSPMthe console logs appear as expected.i.e withSPMlocally everything is fineswift build --configuration release .build/release/Myapp # prints to consolebut when I am running the executable through a docker container running on ECS (linux I suppose), I don't see the lo...
Had the same issue, I filed a radar, and Apple answered:When piped to another process print is buffered, so no characters appear until the buffer is filled up. (When piped to the terminal we only buffer until we hit a newline.)You can get the behavior you want by callingsetbuf(stdout, nil)once at startup:import Darwin ...
Setting DOCKER_HOST after Docker Toolbox/Mac install
Mac here. I installed Docker viathe Toolboxand all Docker commands yield the same error:myuser@mymachine:~/tmp$docker info Get http:///var/run/docker.sock/v1.20/info: dial unix /var/run/docker.sock: no such file or directory. * Are you trying to connect to a TLS-enabled daemon without TLS? myuser@mymachine:~/tmp$sudo ...
Run:$ docker-machine start default $ eval $(docker-machine env default)And try again.Those environment variables point your local Docker client to the Docker engine running in the VM. The above commands will set them appropriately.
How can a script distinguish Docker Toolbox and Docker for Windows?
On my current team, we're still transitioning fromDocker ToolboxtoDocker Desktop for Windows. A lot of our scripts still assume that you're running Docker Toolbox on VirtualBox (like how to mount drives, how slashes or drive names work for those mounts).Is there a reliable way to tell, from inside a script, whetherdock...
Toolbox works viadocker-machine. The way thedockerclient is directed to the virtual machine is via a number of environment variables which you can see by runningdocker-machine env defaultSET DOCKER_TLS_VERIFY=1 SET DOCKER_HOST=tcp://192.168.99.100:2376 SET DOCKER_CERT_PATH=/user/.docker/machine/machines/default SET DOC...
I want to share code content across several containers using docker-compose volume directive
I have a PHP application that I need to containerize. I am setting up the following:container for varnishcontainer for nginxcontainer for php-fpmcontainer for croncontainer for toolingcontainer with PHP code baked intoContainer 2,3,4,5 all need to have access to the same PHP application codebase that is baked into cont...
There are a few ways to handle this:The most work but the better design is to move the code into each image, possibly changing your architecture to have specific pieces of the code in only one image, rather than having all the pieces in every image. Having the code shared creates a tight dependency that is very much a...
Building Dockerfile that has "RUN apt-get update" gives me "jailing process inside rootfs caused 'permission denied'"
My docker host is Ubuntu 19.04. I installed docker using snap. I created a Dockerfile as follows:FROM ubuntu:18.04 USER root RUN apt-get update RUN apt-get -y install build-essential libpcre3 libpcre3-dev zlib1g zlib1g-dev libssl-dev RUN wget http://nginx.org/download/nginx-1.15.12.tar.gz RUN tar -xzvf nginx-1.15.12.ta...
There are several issues in your question:Do not run docker with sudo. If your own user is not allowed to run docker, you should add yourself to the docker group:sudo usermod -aG docker $(whoami)Some of yourRUNcommands have no meaning, or at least not the meaning you intend - for example:RUN cd anythingwill just change...
Error response from daemon: getsockopt: connection refused
When I try to pull an image from a private Docker Registry I get the errorError response from daemon: Get https://XX.XX.XX.XXX:5000/v1/_ping: dial tcp XX.XX.XX.XXX:5000: getsockopt: connection refusedThe docker registry is definitely listening on the correct port. Runningss --listen --tcp -n -pGives the resultState ...
I had the same issue, seems like it related to certificates on your registry host. Check here on how to fix that:https://github.com/docker/docker/issues/23620
How can I use a docker swarm mode manager behind a floating IP
Some providers, such as ScaleWay will give your server an IP that is not attached to a local interface on the box.# docker swarm init --advertise-addr :2377 --listen-addr 0.0.0.0:2377 Error response from daemon: must specify a listening address because the address to advertise is not recognized as a system addressWhile...
There is an issue with nativeswarm mode, when it comes to binding to a non systemIP Addressasdocker 1.12.5. There has been multiple github issues, but the problem still persists.To define non systemIP Address:IP Addressesused with technologies likeDNAT. TheseIP Addressesare not set on local interface and visible to und...
FastApi with gunicorn/uvicorn stops responding
I'm currently usingFastApiwithGunicorn/Uvicornas my server engine.I'm using the following config forGunicorn:TIMEOUT 0 GRACEFUL_TIMEOUT 120 KEEP_ALIVE 5 WORKERS 10Uvicornhas all default settings, and is started in docker container casually:CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000"]Everything...
It was anOut Of Memory error(OOM). The leak was caused byelastic apmmiddleware. I removed it, and leak disappeared.
Docker Login to gcr.io in Powershell
I'm trying to log in to Google's Container Registry on Windows 10 by using aJSON Key file. I have this working without issues on my Mac so the keyfile is definitely working.First off I had issues getting the docker login function to accept the contents of the JSON key file. I've tried running the "/set /p PASS..." comm...
I found a solution that works for both Windows (in PowerShell) and bash. The secret is to use the"provide a password using stdin".cat gcr_registry-ro.json | docker login -u _json_key --password-stdin https://gcr.io Login SucceededHelp text and versions:PS C:\Users\andy> docker login --help Usage: docker login [OPTION...
install .net framework 4.7.2 in docker
I'm new to .Net Environment, I'm trying to implement docker here for my firm. They were using 4.5 earlier so I used the following statement in my dockerfile:RUN Install-WindowsFeature NET-Framework-45-ASPNET ; \ Install-WindowsFeature Web-Asp-Net45Now, I want to do the same for framework 4.7.2 - I thought it will work ...
So i searched for a few things online and i found out that there is one solution that if i mention to install chocolatey on powershell inside my docker file. This reference, I have received from thethis postby anothony chu:so i used:# Install Chocolatey RUN @powershell -NoProfile -ExecutionPolicy Bypass -Command "$env:...
Passing arguments from CMD in docker
I have got below Dockerfile.FROM node:boron # Create app directory RUN mkdir -p /usr/src/akamai WORKDIR /usr/src/akamai # Install app dependencies COPY package.json /usr/src/akamai/ RUN npm install # Bundle app source COPY . /usr/src/akamai #EXPOSE 8080 CMD ["node", "src/akamai-client.js", "purge", "https://www.exa...
You can do that through acombination ofENTRYPOINTandCMD.TheENTRYPOINTspecifies a command that will always be executed when the container starts.TheCMDspecifies arguments that will be fed to theENTRYPOINT.So, withDockerfile:FROM node:boron ... ENTRYPOINT ["node", "src/akamai-client.js"] CMD ["purge", "https://www.exam...
Cannot unzip zip file in DockerFile as non root user
I keep getting the below error when I try to unzip a zip file in my DockerFilecheckdir error: cannot create my-archive Permission denied unable to process my-archive/data/sample.jar The command '/bin/sh -c unzip /home/kong/my-archive.zip' returned a non-zero code: 2In my DockerFile I ...
It looks like you are trying to unzip the archive in the / folder.In fact, theunzipcommand unzips the archive by default in the current directory.Plus, the zip file is downloaded as root and might not be readable by the kong user.Try changing your Dockerfile as follows:RUN useradd -ms /bin/bash kong RUN echo "kong:pass...
Rootless Docker (remote system) and VS Code - Attach VS Code to container failing
I am using the following setupRemote systemRunning "rootless Docker"Docker context named "rootless" being activeVS Code Docker extension being installedVS Code - Connecting via SSH to the remote machine using "Remote Extension"Building and runing the Docker container using rootless DockerChecking that the "rootless" Do...
The problem can be solved by applying the solution from the answer to another question:"answer for .bashrc at ssh login"I followed the instructions and added the following to~/.bash_profile:if [ -f ~/.bashrc ]; then . ~/.bashrc fiBe sure that theexportforDOCKER_HOSTbeing added to the~/.bashrcfile does not contain$UID...
Error using docker compose in AWS Code Pipeline
I'm deploying my dockerized Django app using AWS Code Pipeline but facing some errors of Docker.error:Service 'proxy' failed to build : toomanyrequests: You have reached your pull rate limit. You may increase the limit by authenticating and upgrading: https://www.docker.com/increase-rate-limitdocker-compose-deploy.ymlv...
Docker Hub limits the number of Docker image downloads (“pulls”) based on the account type of the user pulling the image. Pull rates limits are based on individual IP address. For anonymous users, the rate limit is set to 100 pulls per 6 hours per IP address. For authenticated users, it is 200 pulls per 6 hour period. ...
Resource access denied when pushing container to Azure Container Registry
When pushing containers into a private Azure Container Registry using Docker Compose the Azure DevOps pipeline returns the following error:Pushing [container] ([registry]/[app]:latest)...The push refers to repository [docker.io/[registry]/[container]]denied: requested access to the resource is deniedTheazure-pipeline.y...
The solution is to be explicit with the container name. Thedocumentationis misleading as it states firstly that: thecontainerregistrytypeisAzure Container Registryby default. The example goes on to giveContosoas the value forazureContainerRegistry.This is wrong. You need to explicitly set this to the "Login server" val...
Can I install Docker inside a Mac VirtualBox VM?
I have a Mac Sierra 10.12 OS virtual machine, hosted on Windows 10 Home using VirtualBox.I would like to run Docker inside this Mac VM, but when I try, I get the below error message:ErrorIncompatible CPU detected.We are sorry, but your hardware is incompatible with Docker Desktop.Docker requires a processor with virtua...
Docker Desktop for Mac uses HyperKit (seehttps://docs.docker.com/docker-for-mac/install/), which in turn uses xhy.ve that requires CPU EPT (https://en.wikipedia.org/wiki/Second_Level_Address_Translation#EPT,https://github.com/moby/hyperkit).People say that nested virtualization is not yet supported by VB - seehttps://...
Docker ENTRYPOINT shell form with parameters
When I have a Docker image with the following line (a Spring Boot microservice):ENTRYPOINT ["java", "org.springframework.boot.loader.JarLauncher"]I can start the container using e.g.:docker run --rm my_image:1.0.0 --spring.profiles.active=localand it works, the parameter--spring.profiles.active=localis used. However, w...
ENTRYPOINT string_here...has Docker run:["sh", "-c", "string_here"]The problem with this is that when you add more arguments, they're added as new elements on the argument vector, as in:["sh", "-c", "string_here", "arg1", "arg2", "arg3..."]which means they're ignored, becausestring_here, when invoked as a script, doesn...
Max retries exceeded with url: Failed to establish a new connection: [Errno 111] Connection refused'
I keep getting this error:HTTPConnectionPool(host='127.0.0.1', port=8001): Max retries exceeded with url: /api/v1/auth/sign_in (Caused by NewConnectionError(': Failed to establish a new connection: [Errno 111] Connection refused'))I searched through the stackoverflow and couldn't find the solution that would help me.H...
Answer of @jordanm was right and it fixed my problem:Changehost = 'http://127.0.0.1:8001'tohost = 'http://container_2:8000'
Docker version supported in Kubernetes 1.8
I'm going to upgrade my Kubernetes cluster to the version1.8.7. Does anybody know which docker version is best compatible with it?This is what I found on the Kubernetes official page, but I suppose it might be for the latest k8s release (1.9)?On each of your machines, install Docker. Version v1.12 is recommended, but...
According to thekubernetes v1.8.0 changelogContinuous integration builds use Docker versions 1.11.2, 1.12.6, 1.13.1, and 17.03.2. These versions were validated on Kubernetes 1.8.So any of these version should work fine.
Is it possible to install a complex server inside a Docker container?
It appears that Docker is better suited for single process applications and services, but is it capable to offer a stable containment for a more complex application ( that has multiple processes, listening ports, considerable storage usage ) ?
Yes! You can use Supervisor, monit, runit, or even a "real" init system (including upstart or systemd) to run multiple processes. You can even use a cheap shell script like the following:#!/bin/sh ( while true; do run-process-1; done; ) & ( while true; do run-process-2; done; ) & wait
proxyconnect tcp: x509: certificate is valid for Sachith, not myregistry
I had followed given stepshereto create "Authenticate proxy with nginx".Certificates were created usingopensshopenssl req -newkey rsa:4096 -nodes -sha256 -keyout myregistry.key -x509 -days 365 -out myregistry.crtThendocker-compose up --buildbring docker registry starts.When I try to push image to registry (from same P...
I solved this by followingmkdir -p /etc/docker/certs.d/myregistry:5043cp myregistry.crt /etc/docker/certs.d/myregistry:5000/ca.crtcp myregistry.crt /usr/local/share/ca-certificates/ca.crtupdate-ca-certificates
Logging from bash in Docker: logger error: socket /dev/log: No such file or directory
I am trying to configure logger to my script#! /bin/bash alias log="logger -s -t conf_nginx" exec >> /var/log/myscript/file.log exec 2>&1 log "this a log message"when I am executing this script, I only see this line in the log file$ cat /var/log/myscript/file.log logger: socket /dev/log: No such file or directoryPl...
On DockerBecause a Docker container has its own filesystem namespace, the/dev/logsocket from the host won't be available within -- and because best-practice in the Docker world is to have each container only running a single service, there generally won'texista separate log daemon inside the local container.Best practi...
How can I edit files in a docker container when it's down/not-started
Use-case: I started some nice docker image and my container needs some playing around (configuration file changes for research). I edit a file (using sed or vim ;-) ) and then I stop the container and try to start it. Now I made a mistake in the configuration and the docker container does not come up when I do:docker r...
Based on the advice ofjpetazzo(seehttps://github.com/jpetazzo/nsenter/issues/27#issuecomment-53799568) I started a different container that used the 'volumes' of the original container. Here is how:docker run --volumes-from -it busyboxThis will start a busybox shell. In there you have vi and other tools to inspect and...
nsq cannot consume message by connecting to nsqlookupd
I tried to use docker-compose to run nsq, thedocker-compose.ymlas below:version: '3' services: nsqlookupd: image: nsqio/nsq command: /nsqlookupd ports: - "4160:4160" - "4161:4161" nsqd: image: nsqio/nsq command: /nsqd --lookupd-tcp-address=nsqlookupd:4160 depends_on: - nsql...
I output the go-nsq log, then find the root cause, should add-broadcast-address=127.0.0.1for nsqd command, if not,nsqd will register its hostname to nsqlookupd, it cannot be resolved by client.
How do I pass arguments to docker run in a CLI (Command Line Interface)?
I need my image to start with this command:docker run -it --rm --security-opt seccomp=./chrome.json I'm deploying it to Google Compute Engine:https://cloud.google.com/compute/docs/containers/deploying-containersAs far as I understand, I can't specify arguments there, so Google Cloud starts it with justdocker runcommand...
When you use the feature to deploy container directly on Compute Engine, you are limited to the definition ofEntry pointArgs to pass at the entry pointEnvironment variablesThat's all, you can't add additional/custom params.One solution is, instead of using the built in feature, to use thecontainer-optimized OS (COS) on...
Where to store media files of Django app in order to save them after docker container updating?
I have a Django app where media files are uploading to the my_project_directory/media/images/ (so nothing special, just a common approach). The problem raised after dockerizing my app. Every time i need to update my container after pulling latest docker image, old container is removed(including, of course media files) ...
simply use dockervolumesto mount your persistent data outside of the container. More info can be foundhere.
How to pass variable as attribute to xml configuration file in Wildfly with Docker
I'm trying to pass values from docker-compose.yml file to Wildfly configuration dynamically. I want to have flexibility of mail configuration - just for quick change of addres, or username, or port..In this case, I tried to do that by forwarding environment variables from docker-compose.yml, by dockerfile as arguments...
Almost there. In your docker file, you have defined environmental variables therefore you need to reference them as environmental variables in your wildfly config. The easiest way is to prefix your env var withenv.prefix. So in your example, you have env variablesHOST,SSL,USERNAME... which you can reference in standalo...
Does Docker FROM Keyword in Dockerfile look for the newest image?
I have a CI Runner that automatically builds a docker image from a Dockerfile. My docker image is based on another docker image. So the beginning of my Dockerfile looks like this:FROM linktoimage/imagename:latestDoes docker check during the build process if my local version ofimagenameis still the latest (similar to do...
Does docker check during the build process if my local version of imagename is still the latest (similar to docker pull)?No, docker will not do this by default because of the build cache. It will use whatever existing image it has locally in the cache [1].You can however enable the behavior you desire by using the--no-...
SQL Server instance string connection in Linux Docker
I'm publishing an application to docker imagemicrosoft/dotnet:1.0.1-corethat reference Sql Server instance in connection string:"Data Source=host\instance;Initial Catalog=database;User ID=user;Password=pass;"In Windows environment it work's as well, but using docker, the application cannot connect to the database. Chan...
According to Saurabh Singh from Microsoft:The Instance name support is available in v 1.1 of .Net Core. In v1.0 of .Net Core, Instance names are not supported on OS other than Windows.So I don't think you can connect from .Net Core 1.0 running on Linux to an SQL Server using instance name.Your choices seem to be:don'...
Deploy FeathersJS App on Heroku
I'm trying to deploy myfeathersjsweb app on heroku, and since feathers is simply an express wrapper I thought it was like deploy an ordinary node app. I got the "npm start" script on my package.json, I added heroku remote to my git repo and when I push heroku run "yarn install" and the "npm start" script. But just when...
It is the same as Express but the generated application will by default usefeathers-configurationto pull in your application settings. From the error message it looks like you are not providing a properNODE_ENVenvironment variable which has to be set toproductionwhen deploying to Heroku.