Prompt
stringlengths
14
160
Instruction
stringlengths
18
2k
Response
stringlengths
8
2k
addAfterColumn is not allowed on postgresql
To fix vulnerabilities I upgraded docker image version in my dockerfile:old:FROM liquibase/liquibase:4.4new:FROM liquibase/liquibase:4.20But I started to get error:addAfterColumn is not allowed on postgresqlI started to investigate this error and found out that in some changesetsaddAfterColumnis used. I also foun...
Asthis pull requestshows, previously liquibase did not warn that column ordering might not be applied, because the database does not support it. So it failed silently in older versions, but now it shows an error. Quoting the most important line:Breaking change:Because I fixed the validation logic, anyone who has a befo...
What's the right way to pass browser profile to selenium inside docker container?
I need to launchseleniuminsidedockercontainer. It's important to pass browser profile towebdriver.Here'sdocker-compose:version: '2' services: worker_main: build: ./app volumes: - /Users/username/Library/Application Support/Google/Chrome/Profile 1:/profile restart: always env_file: - confi...
You can try doing it this way:$ docker run --rm -p 4444:4444 -p 5900:5900 \ -v /tmp/chrome_profiles:/tmp/chrome_profiles \ -e JAVA_OPTS selenium/standalone-chrome:latestor# To execute this docker-compose yml file use `docker-compose -f up` # Add the `-d` flag at the end for detached execution version: '2' services...
dotnet core docker container - Unable to bind to https://localhost:5001 on the IPv6 loopback interface
I created an image for .NET core:FROM microsoft/dotnet:2.1-sdk AS build-env WORKDIR /app EXPOSE 80 443 5000 5001 5010 5011 7000 22676 #ENTRYPOINT [ "bash"] CMD ["bash"]I run a container from itdocker container run -it --publish 5000:8018 --name versie3001 -v //c/tijd/mount:/app michel03What goes well is that I see th...
Your--publishoption is backwards: it's-p :, so for your setup you'd want--publish 8018:5000.Startup issues aside, you do need the option to cause the container to listen on 0.0.0.0 (or ::0, if IPv6 works). If it binds to localhost it will be unreachable from outside its container, including from other containers and f...
Adding Plugin to Kibana Image in docker-compose.yml
I am new to using docker and trying to add the elastalert plugin to my kibana image. I am using Kibana 7.0.1 and Elasticsearch 7.0.1 and trying to use the elastalert 7.0.1 kibana plugin from github. When I rundocker-compose upusing the below docker-compose.yml file it does seem to install the plugin, but it doesn't act...
So when you override command section you must remember to keep existing behavior which is set by image author.So in you case you can actually install kibana plugin this way but you must also add Kibana start at the end of the command by using e.g. && to run process after plugin installation. So in your case it should b...
Permission denied while executing script entrypoint.sh from dockerfile in Kubernetes
I have amultistagedockerfilewhich I'm deploying in k8s with script asENTRYPOINT ["./entrypoint.sh"].Deployment is done though helm and env is Azure. While creating the container it errors out"./entrypoint.sh": permission denied: unknownWarning Failed 14s (x3 over 31s) kubelet Error: failed to create co...
Usebash(or your preferred shell if notbash) in the entrypoint:ENTRYPOINT [ "bash", "-c", "./entrypoint.sh" ]This will run the entrypoint script even if you haven't set the script as executable (which I see you have)You an also use this similarly with other scripts, for example with Python:ENTRYPOINT [ "python", "./entr...
dockerfile expose port cannot telnet
i write dockerfileEXPOSE 2181 2888 3888and docker psCONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES abc644fe1ad0 00088267fb34 "/opt/startzookeeper…" 2 seconds ago Up 1 second 2181/tcp, 2888/tcp, 3...
EXPOSEis just a metadata added to the image (as noted in "Docker ports are not exposed").It does not actuallypublishthe port.You need to make sure youdocker runthe image with-poption, in order to actually publish the container port to an host port.-p=[]Publish a container᾿s port or a range of ports to the hostformat:ip...
Docker-Compose: Can't Connect to Mongo
I'm trying to use Docker to containerize a web application that uses a Flask web server and a MongoDB database.Within the Flask server, I attempt to connect to Mongo using an environment variable namedMONGO_URI:db = MongoClient(os.environ['MONGO_URI'], connect=False)['cat_database']Within the container, I attempt to co...
Thedepends_onsection is only forcontrolling startup order.Alinksornetworkssection is also required to allow the containers to talk to each order.Update thewebsection of the docker-compose.yml file to add the link to themongo_servicecontainer:... web: depends_on: - mongo_service links: - mongo_serv...
Docker image with dependencies pre-installed for CI
Common advice (example) for carrying out CI is to use an image with pre-installed dependencies. Unfortunately for a n00b like me, the link in question doesn't go into further detail.When I look for docker tutorials, it seems that usually teach you how to containerise an app rather than, say, Python with some pre-instal...
To make it faster I will recommend creating your custom Dockerfile based onpython:3.7that has installed all the dependency during the build. So this will save your time and your job will do not need to install dependency during each job build.FROM python:3.7 RUN python --version # Create app directory WORKDIR /app #...
Nginx: Proxy pass / proxy redirect to shiny web applications
We are trying to update our internal server infrastructure and to proxy all accesses to our R shiny webservers through an Nginx server. Im able to get a response from the shiny server but Im not able to get related files like css/js through the Nginx server.Setup:2 docker container (1 for hosting nginx, 1 running R for...
Looks like the iframes acting as a browser are receiving the hostname instead of the full path to the resources. Can you set up the following ReverseProxy headers and give it a go:proxy_set_header X-Forwarded-Host $host:$server_port; proxy_set_header X-Forwarded-Server $host; proxy_set_header X-Forwarded-For $proxy_add...
Unable to build Docker image using new Mac M1
I am attempting to build a Docker image for my application to use within Integration tests.The image can be built fine on my old 2017 Macbook but fails when trying on my new Macbook with the M1 chip.The error I receive is:unable to build image: The command '/bin/sh -c make build' returned a non-zero code: 2 {"version...
After some investigation, I found out this seemed to be an issue when using the Alpine container for my Go application. To fix this I had to add thebinutils-golddependency within my Dockerfile.My Dockerfile now looks like the below and has fixed the issue:FROM golang:1.15.3-alpine3.12 AS builder RUN apk update && apk ...
ERROR: syntax error at or near "CREATE" in Docker-compose Postgres
I am trying to create two tables using docker-compose and a dockerfile with postgres sql. However, I get the following error.psql:/docker-entrypoint-initdb.d/tables/users.sql:11: ERROR: syntax error at or near "CREATE" postgres_1 | LINE 2: CREATE TABLE usersI am not sure what I am doing wrong, but I checked my...
you miss semicolon afterBEGIN TRANSACTION
Docker Tomcat container unable to access Postgres container
I have a alpine docker with postgres, with listen address '*' and listening to 5432, which I'm deploying usingdocker run -d --name postgres me/postgres:v1and my tomcat container with oracle jre8, on which I'm deploying my rest web service using:# Set environment ENV CATALINA_HOME /opt/tomcat EXPOSE 8080 # Launch ...
While using --link, point to postgres (i.e., your postgresql container name) instead of IPjdbc:postgresql://postgres:5432/dBNameSo for a full solution, run your postgresql and tomcat containerdocker run -d --name postgres me/postgresql:v1 docker run -d -p 8080:8080 --name tomcat --link postgres:postgres me/tomcat:v1(No...
Dotnet Watch Run gives me a Rosetta Error: attachment of code signature supplement failed: 1 after save
I'm having a problem with my .Net Core 3.1 Project. I'm using Docker for hosting the MS SQL Database (image azure-sql-edge) and I run it on a MacBook Pro M1 Max.When starting the project with Dotnet Watch Run everything works ok but after a save in Visual Studio Dotnet Watch Run restarts and gives me an error:rosetta e...
After updating Dotnet DSK to 3.1.425 (release date November 8th 2022) the issue was fixed.
Kubernetes: How to automatically clean up unused images
Due to some internal issues, we need to remove unused images as soon as they become unused.I do know it's possible to useGarbage collectionbut it doesn't offer strict policy as we need. I've come acrossthissolution butit's deprecatedit also removes containers and possible mounted volumesI was thinking about setting ac...
This doesn't really accomplish much since things will be re-downloaded if they are requested again. But if you insist on a silly thing, best bet is a DaemonSet that runs with the host docker control socket hostPath-mounted in and runsdocker system pruneas you mentioned. You can't use a cron job so you need to write the...
How to pack and ship a simple c application in docker without the gcc compiler?
I have a small c program application, I want to build a docker image for that and push it to docker hub and access on any platform. I want to achieve this within 50MB of image size. i.e. should be able to pack c application and run it without GCC compiler.Please, it will be a great help if one can suggest a way to buil...
You can use Alpine which is less then 5MB, In the case of multi-stage build, you can have the samebonus of 5MBStage one: Compiling the source code to generate executable binary andStage two: Running the result.# use alpine as base image FROM alpine as build-env # install build-base meta package inside build-env contain...
Docker: non-root user does not have writing permissions when using volumes
I have the following Dockerfile:... RUN groupadd -r myuser&& useradd -r -g myuser myuser RUN mkdir /data && chmod a+rwx /data USER myuser ...Running the image withdocker runworks fine (I mean the usermyuserhas writing rights in the/datadirectory).If I run the image withdocker run -v /host/path:/data, the usermyuse...
You can run the container as the user ID matching the host user ID owning the directory. Often this is the current user:docker run -u $(id -u) -v /host/path:/container/path ...For this to work, your image needs to do a couple of things:The data needs to be kept somewhere completely separate from the application code. ...
Unable to load local docker image in kind kubernetes cluster
I have an Apple Macbook Pro with an M1 chip, where I have a local kubernetes cluster running throughKind. The thing is I don't understand howKinddeals with docker images from different platforms/architectures. The thing is I have an application installed viaHelmthat points to some docker images withlinux/amd64architect...
After asking in theKind Slack channel in the Kubernetes workspaceI could finally find the answer to my question:whole thread here.TL,DR;Kindwas unable to load the images with architectures that don't match the host architecture because it lacked a required--all-platformsargument in the call to thectrtool used bykind lo...
How to share file or directory with other container on ECS?
I have a Sumologic log collector which is a generic log collector. I want the log collector to see logs and a config file from a different container. How do I accomplish this?
ECS containers can mount volumes so you would define{ "containerDefinitions": [ { "mountPoints": [ { "sourceVolume": "logs", "containerPath": "/tmp/clogs/" }, } ], "volumes": [ { "name": "logs", ...
yum install error docker
CentOS version: lsb_release -d Description: CentOS release 6.5 (Final)My repo looks like thiscat /etc/yum.repos.d/docker.repo [dockerrepo] name=Docker Repository baseurl=https://yum.dockerproject.org/repo/main/centos/$releasever/ enabled=1 gpgcheck=1 gpgkey=https://yum.dockerproject.org/gpgI have some old version ...
Docker's official releaseno longer supports RHEL/Centos 6. I think that stopped with 1.7.1 and the official release is at 1.10. I would suggest updating to Centos 7 or anything with a 3.10+ kernel to use the latestdocker-engineas it has improved quite a bit.If you are stuck with Centos 6.5 then either continue with the...
azure logic apps: waiting for an ACI container to terminate to get its logs
I have an Azure logic app that correctly creates an Azure Container Instance. The container starts, does its job and terminates. I need to collect its logs with the appropriate connector and write them to an azure blob.I have all the pieces in place but I do not know how to wait for the container to terminate before us...
starting from Charles Xu's answer, the correct sequence when setting the variable isthis uses the "state" container instance variable instead of "provisioning state". The latter is about the creation of the container group, the first is about the state of the container instance, which is what I need. I added a delay t...
How to write a Dockerfile for a custom python project?
I'm pretty new to Docker, and I need to create the container to run Docker container as an Apache Mesos task.The problem is that I can't find any relevant examples. They all are centered around Web development, which is not my case.I have a pure Python project with large number of dependencies ( like Berkeley Caffe or ...
The docker hub registry contains a number of official language images, which you can use as your base image.https://hub.docker.com/_/python/The instructions tell you how you can build your python project, including the importation of dependencies.├── Dockerfile <-- Docker build file ├── requirements.txt ...
Share docker volumes from multiple hosts?
https://nickjanetakis.com/blog/docker-tip-28-named-volumes-vs-path-based-volumesseems to suggest that bothnamed volumesandpath based volumesare stored in the docker host (where containers are run)Suppose I havewebandnginxservice.I thought I could runwebservice in one host andnginxin another host (two different machines...
Docker doesn't have a built in software based solution to share volumes across multiple machines yet. There's work oninfinitbut they haven't released anything for production usage.There are 3rd party storage solutions, that you can use. If you're on a cloud provider, their solution is typically the best for your use ca...
Docker apache image, store logs in host?
I use Docker to build an Apache image, and then use docker-compose to run it. I set up Apache access.log and error.log and want to store them outside of the container. currently, I use Volumes but it stores the data both in container and host.docker-compose.ymlversion: '2' services: web: image: apache build:...
Volumes but it stores the data both in container and host.Not really, it should only store data in the host (and makes it visible in the containerthrough a bind mount)if there is a way to stream apache log data to stdoutPossible yes,through configuration, but that would not be persistent.
Zeppelin fails to load on docker: logErrors docker zeppelin
First issue I´m having is that I can not pull the base image without specifying the version tag, not a big deal... but I find it odd, after thatdocker pull apache/zeppelin:0.8.2After that I´m able to get the image, but one I try to run it as:docker run -p 8080:8080 apache/zeppelin:0.8.2ordocker run -p 8080:8080 --rm -...
Zeppelin Docker documentation is missing. You can find some recent fixes in their repo, e.g. env variableZEPPELIN_ADDR=0.0.0.0:docker run --rm -ti \ -p 8080:8080 \ -e ZEPPELIN_ADDR=0.0.0.0 \ --name zeppelin \ apache/zeppelin:0.8.2
How can I make docker container IP addresses accessible in a WLAN?
I'm running Docker containers on a host (A) which is in a local network and gets its IP address from the WLAN router via DHCP. I'd like to access the docker containers via IP address from another host (B) which is in the same local network. I've configured amacvlandocker network in my docker compose file. However if I ...
Macvlan does not generally work over wireless interfaces. It just took me hours to discover that, as it is nowhere mentioned in most macvlan documentation. See:http://hicu.be/macvlan-vs-ipvlanFrom my understanding, access points don't like getting packets from MAC addresses that haven't previously authenticated with th...
Install docker on RedHatLinux 6.7
I am following the documentationhttps://docs.docker.com/engine/installation/rhel/to install docker on RHEL 6.7. When I run the commandsudo yum install docker-engineI get the following errorError: Package: docker-engine-1.9.1-1.el7.centos.x86_64 (dockerrepo) Requires: libsystemd-journal.so.0(LIBSYSTEMD_JOURN...
Below steps do work for Docker to be installed on OEL 6.10 with a user having super user privileges.Create a user with SUDO Access as suggested in Red-Hat Docs ([Link][1] speaks well on this process). For instance I created an user as docker with group as docker.groupadd docker useradd -m -g docker dockerAdd docker r...
Can not connect mysql with laravel (docker)
I'm very new to laravel and docker and trying to connect mysql to php container(laravel). I thought set right my docker-compose.yml and env file in laravel project.Also, I can connect to mysql db inside the container.Here is a error when I did php artisan migrate :SQLSTATE[HY000] [2002] Connection refused (SQL: select...
finally this problem is solved. I changed .env DB_HOST=127.0.0.1 to DB_HOST=db then it's work!!" DB_HOST= service name of mysql container on docker-compose.yml "this time my mysql container name is db, so needed to DB_HOST to be db.
Exposing a docker container to the internet
I deployed a ghost blogging platform on my server using docker. Now I want to expose it to the internet but I'm having some difficulties doing so.I opened port8000in my router a forwarded it to port32769which is the one assign to that container. Using port32769inside my network I can access the website fine but when I ...
Let's say your application inside docker is now working on port 8000 You want to expose your application to internet. The request would go: internet -> router -> physical computer (host machine) -> docker.You need to export your application to your host machine, this could be done viaEXPOSE 8000instruction in Dockerfil...
Dockerfile: How to set apt mirror based on the ubuntu release
While building a docker image, it's possible to set the custom apt mirror by overwriting the/etc/apt/sources.list, e.g.FROM ubuntu:focal RUN echo "deb mirror://mirrors.ubuntu.com/mirrors.txt focal main restricted universe multiverse" > /etc/apt/sources.list && \ echo "deb mirror://mirrors.ubuntu.com/mirrors.txt fo...
Thelsb-releasepackage is not included in the minimal Ubuntu image, but you could make use of/etc/lsb-releaseor/etc/os-releasefile instead (the second one is in common use, refer tothis answerfor comparison).For Dockerfile, just change$(lsb_release -cs)to$(. /etc/os-release && echo $VERSION_CODENAME), you won't waste ti...
How to run Docker inside Jenkins which is running as container
I'm working on Centos7. I have a Docker container which is running Jenkins. In that Jenkins-container I have to build and run other Docker containers. But Jenkins doesn't know docker. I'm able to execute a shell and install docker inside the container. But isn't it possible to let the container use my docker-engine on ...
Generally, a container-in-container setup involves linking/var/run/docker.sockanddockeritself.For example,in this thread:docker run --name jenkins --privileged=true -t -i --rm -v /var/run/docker.sock:/var/run/docker.sock -v $(which docker):/bin/docker -p 8080:8080 jenkinsThis is not exactly your case, since you don't n...
What's the difference when installing docker with 2 of these following command?
When it comes to install Docker on centos, i found 2 different ways to do it.The first one is :yum install docker-engineThe second one is:yum install docker-ioAnd in case i installed docker using the first one, it i continue with the second one the error appeared, like this:Error: docker-engine conflicts with docker-1....
This dates backfrom June 2015, whenDocker announced"New Apt and Yum Repos"That is when new packages (like the one for CentOS) were named docker-engine (initially to replacelxc-docker*)
Redis Mass Insertion - Errors out
I'm trying to followRedis Mass Insertion – RediswithRedisand something is amiss(.root@f7ca5eef4a4c:~# redis-cli --version redis-cli 3.0.6 root@f7ca5eef4a4c:~# redis-cli 127.0.0.1:6379> flushall OK 127.0.0.1:6379> root@f7ca5eef4a4c:~# for i in {0..10} ; do echo "SET...
I think redis is expecting lines terminated by\ror\r\n. If you're doing this on linux, you'll get\nterminated lines, which redis can't parse.Try this, in the same directory where you entered the other commands:# rm $$ # for i in {0..10} ; do printf "SET Key$i Value$i\r\n" >> $$ ; done # cat $$ | redis-cli --pipeWhoever...
Is it possible to expose docker ports to a specific interface
My server has two network interfaces, eth0 and wlan0, one connected to the internet and the other to an internal network. The current solution of exposing Docker container ports with docker-compose to a specific interface is to use:version: '2' services: mosquitto: ports: - "192.168.0.1:1883:1883"This make...
You can address either of the two blockers mentioned as such:With regards to the dynamic DHCP IPs, you can follow this resin.io guide about setting up static IPs:https://docs.resin.io/reference/resinOS/network/2.x/#setting-a-static-ip. After setting up a static ip, you should be able to use it in theportsconfiguration....
Laravel installed on a local volume (Mac) from docker nginx/php-fpm can't write session files
I have a docker-compose.yml file that runs the following (create image called mmm/nginx):web: image: mmm/nginx ports: - "80:80" volumes: - ./var:/var/www - ./etc/nginx/sites-enabled:/etc/nginx/sites-enabled/ links: - php - db php: image: rossriley/php56-fpm volumes: - ./var:/var/www - ./etc/php5/php-fpm.c...
I don't know if this help, but if your using a Dockerfile you can addRUN usermod -u 1000 nginxor if your using Apache you can sub. nginx for apache.This seems to be only an issue for OS X and the issue is actually something to do with VirtualBox and not directly related to Docker. I had this issue with Docker v1.9.x an...
Is there a direct way to send container logs to azure log analytics workspace from iot edge device?
I am looking for a solution to send the application logs generated on iot edge devices to an azure log analytics workspace.I have tried using the Microsoft Monitoring agent using which I was able to send logs generated by running docker containers. However, on an edge device, we are using the moby engine instead of the...
There is no built-in way as of today (might be worth checking with team on Github, as they might have this on the roadmap).However, you can build your own solution using the newlog-pull feature:Write a small time-triggered Azure Function that pulls the logs every few minutes for the containers you are interested in (or...
Use Prometheus "target relabeling" to extract cAdvisor's Docker image name without tag
I usePrometheus, together withcAdvisorto monitor my environment.Now, I tried to use Prometheus' "target relabeling", and create a label that its value is the Docker container's image name, without a tag. It is based on the originally scrapedimagelabel.It doesn't work, for some reason, showing no errors when running on ...
The image label is not a target label, it's on the metrics themselves. Thus you should usemetric_relabel_configsrather thanrelabel_configsMy blog onLife of a Labelexplains how this works.
Can the kafka connectors be configured via env variables passed when launching docker? Or curl is the only way?
This is the docker image we use to host docker-connect with the pluginsFROM confluentinc/cp-kafka-connect:5.3.1 ENV CONNECT_PLUGIN_PATH=/usr/share/java # JDBC-MariaDB RUN wget -nv -P /usr/share/java/kafka-connect-jdbc/ https://downloads.mariadb.com/Connectors/java/connector-java-2.4.4/mariadb-java-client-2.4.4.jar #...
You can't pass it as environment variables, but you can specify it as part of your Docker startup by passing in a custom command. Here's an example of doing it with Docker Compose. If you're callingdocker runitself you'd need to rework this into an appropriate structure:kafka-connect: image: confluentinc/cp-kafka-con...
Scaling with docker-compose and appending a number to the hostname?
I've got adocker-compose.yml:master: build: . slave: image: master hostname: slave command: run_slaveHow can I makedocker-compose scale slave=5generate machines with unique hostnames?...e.g. something like this:slave1 slave2 slave3 slave4 slave5
There is no way to set the hostname to that value.If you need a unique identifier, I would use the unique container id, which you can get by running$(hostname).
REPOSITORY <none> TAG <none>
I am new here trying to learn docker, I started this tutorialhttps://docs.docker.com/engine/examples/nodejs_web_app/Building your image$ docker build -t mlotfi/centos-node-hello .mlotfiis my username inhttps://hub.docker.com/when I diddocker images, I got:REPOSITORY TAG IMAGE ID CRE...
That can happen if your docker build sequence does not got all the way, meaning it stops on error at some point in the Dockerfile.The result of that interrupted process is the last intermediate image built by the Dockerfile line that succeeded, just before the Dockerfile line that fail to execute properly.Other reasons...
bindfs - Doesn't work for folder inside "/proc"
Bindfs doesn't work for folder inside "/proc"...[root@some_host some_folder]# bindfs --map=root/ "/proc//" "/home//" Failed to resolve source directory `/proc//': No such file or directory [root@some_host some_folder]# ls "/proc//" some_fileWhy?Thanks!UPDATE:Example with Docker container...I ended up finding out that f...
I released bindfs 1.13.10 with a workaround for this.Explanation for why it didn't work:https://github.com/mpartel/bindfs/issues/66#issuecomment-428323548
Where can I configure the start user UID for Docker containers?
Where can I configure the start user UID for Docker containers? By default it uses UID 999 which conflicts with some other users on my system.
In your Dockerfile, run the following command:RUN groupadd -r -g 1234 newusername && useradd -r -u 1234 -g newusername newusername USER newusernameThis will create a usernewusernamewith GID 1234 and UID 1234, then run the container with a default usernewusername.
Starting TensorFlow on Docker on Google Cloud
I followed the directions to install TensorFlow on Docker on Google Cloud here :http://tensorflow.org/get_started/os_setup.html#docker-based-installationThe first time, it did work and showed the tensorflow prompt. Now that I have logged out and back in, I get this:technologiclee@docker-playground:~$ docker run -it b.g...
Thedocker run -itcommand brings up a bash shell in a container where TensorFlow is installed. Once you are at theroot@2e87064f0743:/#prompt you can start an interactive TensorFlow session by startingipythonas the following example shows:$ docker run -it b.gcr.io/tensorflow/tensorflow root@2e87064f0743:/# ipython Pyth...
Building Docker images using Jenkins results in "Unsupported protocol scheme found"
I'm followingthisonline tutorial line by line. But at step 3 -Task: Configure Plugin- I'm getting this error message, when I press "Test connection" button:Unsupported protocol scheme found:http://172.17.0.59:2345Here is a screen of what I've done:So, what is wrong with that and what is the right way of configuring Doc...
I followed the same tutorial, and entered instead:tcp://172.17.0.18:2345/The test did work:Version = 1.10.0, API Version = 1.22
Can't build docker compose on M1 chipset
I tried to build the docker compose on M1 chipset and getting error as such:/remi/enterprise/7/php73/aarch64/repodata/repomd.xml: [Errno 14] HTTPS Error 404 - Not FoundBut in my Intel chip, I haven't encountered this problem. Apparently there are not much solutions on the internet as well. Have anyone encountered the s...
/remi/enterprise/7/php73/aarch64/repodata/repomd.xml: [Errno 14] HTTPS Error 404 - Not FoundRemi's Repository is only for x86_64 architecture for now.You can try drpixel repository (rebuild of remi's packages)Seehttps://repo.drpixel.fr/
Docker - commit container with running processes (postgresql)
Is it possible to commit a container with postgresql running so that it is ready immediately? I have tried using a startup script, CMD and bashrc to start postgresql, which all start it fine when usingdocker run -it [containerID]but it takes approximately 3-5 seconds for postgresql to come up once logged in. I unfortu...
Image is just a set of files there are no processes, so question does not make sense. When you start container from image then process will start here - processes exists only in executing container, when container stops there are no processes anymore - only files from container's filesystem.
Jenkins service in Docker swarm stays at 0/1 replicas
I'm trying to run a fault tolerant Jenkins in a docker swarm using the following command:docker service create --replicas 1 --name jenkins -p 8080:8080 -p 50000:50000 --mount src=/home/ubuntu/jenkins_home,dst=/var/jenkins_home jenkins:alpineBut checking the service status and containers running I see that the replicas ...
The problem was with the parameters passed to the --mount option.I was trying to pass the source as a host directory, when I should be passing a docker volume according todocker swarm documentation. To correct the problem I did the following.docker volume create --name jenkins_home docker service create --replicas 1 ...
Map ports so you can access docker running apps from OSX host
I have been playing with Docker for a while (on OSX via Vagrant) which worked really nice. In order to access my apps running in the docker containers I had to setup Vagrant to use static IPs ("private_network" setup).While this worked well I think the new approach to use boot2docker is a little lighter and more conven...
If you're using VirtualBox, configure port forwarding like:$ VBoxManage modifyvm "boot2docker-vm" --natpf1 "tcp-port5000,tcp,,5000,,5672" $ VBoxManage modifyvm "boot2docker-vm" --natpf1 "udp-port5000,udp,,5000,,5672"Read more:http://www.deadcodersociety.org/blog/forwarding-a-range-of-ports-in-virtualbox/https://github....
What is the purpose of defining VOLUME mount points within DockerFile rather than adhoc cmd-line -v?
I understand that using the VOLUME command within a Dockerfile, defines a mount point within container.FROM centos:6 VOLUME /htmlHowever I noticed that without that VOLUME definition, it's still possible to mount on that VOLUME point regardless of defining itdocker run -ti -v /path/to/my/html:/html centos:6What is the ...
VOLUMEinstruction used within aDockerfiledoes not allow us to do host mount, that is where we mount a directory from the host OS into a container.However other containers can still mount into the volumes of a container using the--from-container=, created with theVOLUMESinstruction in theDockerfile
docker run --ulimit cpu=10 does not kill java process after timeout
I want to make sure the process gets killed after 10 seconds of CPU time. Docker run command accepts the flag--ulimit cpu=10that is supposed to do that.However when I run java command using this, the ulimit setting is ignored. The java process with infinite loop continues even after 10s (actually for minutes until I ki...
After someexperimentingI re-read the original question and also took into account the fact that it is independent of the type of program being launched, that is, Java, C++, etc.: the reason why it works in the one case (when invoked withbash -c) and not when you directly invoke it is thatulimitis abash built in command...
Using Hadoop and Spark on Docker containers
I want to use Big Data Analytics for my work. I have already implemented all the docker stuff creating containers within containers. I am new to Big Data however and I have come to know that using Hadoop for HDFS and using Spark instead of MapReduce on Hadoop itself is the best way for websites and applications when sp...
You can try playing with Cloudera QuickStart Docker Image to get started. Please take a look athttps://hub.docker.com/r/cloudera/quickstart/. This docker image supports single-node deployment of Cloudera's Hadoop platform, and Cloudera Manager. Also this docker image supports spark too.
Run docker container Error: Could not find base path /models/model for servable model
Im have problem when I've trying to run a docker container using docker image: tensorflow/serving.I run the cmd:docker run --name=tf_serving -it tensorflow/servingThe result is:2019-10-28 04:23:56.858540: I tensorflow_serving/model_servers/server_core.cc:462] Adding/updating models. 2019-10-28 04:23:56.858571: I tensor...
I found the solution, for someone who has the same problems, we need to provide the model path in the local computer and in docker:docker run --name=the_name -p 9000:9000 -it -v "/path_to_the_model_in_computer:/path_to_model_in_docker" tensorflow/serving:1.15.0 --model_name=MODEL_NAME --port=9000
How to enable docker remote API in "Docker for Windows"
I haveDocker Desktop for Windows1.12.1-stable(build: 7135) installed on my Windows 10 machine. I want to access docker using theremote APIthrough port4243. I guess this port is not enabled by default. Do you have any idea how to open it?
You can edit the configuration for docker daemon. Add a daemon.json file in the following path: %ProgramData%\docker\configThe file should contain something like this:{ "hosts": ["tcp://0.0.0.0:4243"] }Then restart docker service.(eg Powershell: Restart-Service docker )References:How to use Remote API with Windows ...
docker image: openjdk:15: how to install python inside it
I want to create an image of openjdk15 and pythonI am trying the Dockerfile for buidFROM openjdk:15 RUN yum install -y oracle-epel-release-el7 RUN yum install -y python36But when i try to build the image it shows/bin/sh: yum: command not found The command '/bin/sh -c yum install -y oracle-epel-release-el7' returned ...
It seems that yum is not available on this image. It usesmicrodnfas package manager. Simply use following dockerfile to install python 3.6 :FROM openjdk:15 RUN microdnf install python36After building and running a container with shell process I received :bash-4.4# python3 -V Python 3.6.8
Proper JSON notation syntax in a Dockerfile when piping output through multiple commands on a `CMD` line?
I am running through a Docker tutorial, and the Dockerfile contains the following line:CMD /usr/games/fortune -a | cowsayWhen usinghadolintto lint the file, I get this recommendation:DL3025 Use arguments JSON notation for CMD and ENTRYPOINT argumentsSo I update theCMDline with JSON notation for the arguments:CMD ["/usr...
|is a shell symbol which only works within a shell environment.CMD command param1 param2 (shell form)This will work as follows:CMD [ "sh", "-c", "command param1 param2"].CMD ["executable", "param1", "param2"] (exec form, this is the preferred form)This will not invoke a shell, so|will not function.You may reference som...
No Matching Manifest Error when using Sail on Laravel
I am attempting to setup a basic project in Laravel using Laravel Sail. According to theofficial Laravel documentationthe following commands will create a new Laravel application called "example-app" and start Laravel Sail.curl -s "https://laravel.build/example-app" | bash cd example-app ./vendor/bin/sail upHowever, a...
This error occurs when using Laravel Sail on Macs with the Apple M1 chip. The docker-compose file provided by Laravel Sail uses MySQL by default. As configured, the docker-compose file is attempting to use an unknown version of MySQL (linux/arm64/v8). This fails with the error message above.This can be solved by ope...
what are the advantages of having layers in a docker image?
Let's say I have two different Dockerfiles.Image one called nudoc/my-base-image:1.1FROM ubuntu:16.10 COPY . /test.warImage two called nudoc/my-testrun-image:1.1FROM acme/my-base-image:1.1 CMD /test/start.shBoth have the layers in common.What are the advantages of having layers in a docker image? does it benefit from p...
As Henry already statedCommon layers are downloaded only once and are stored only once. So this has benefits for download as well as storage.Additionaly building an image will reuse layers if the creating command allows. This reduces the build time. For example if you copy a file into your image and the file is the sam...
Dockerfile: RUN ls -l [duplicate]
When building Docker images withDOCKER_BUILDKIT=1, there is a very cool progress indicator but no command output. How do I see the command output to debug my build?
Have you tried--progress=plain?Example:DockerfileFROM alpine RUN ps auxbuildcommand:DOCKER_BUILDKIT=1 docker build --progress=plain -t test_buildkit .Relative output:#5 [2/2] RUN ps aux #5 digest: sha256:e2e4ae1e7db9bc398cbcb5b0e93b137795913d2b626babb0f148a60017379d86 #5 name: "[2/2] RUN ps aux" #5 s...
Usage of env variable in docker compose run command
Running the commanddocker-compose run -e TYPE=result mongo_db_backupshould give me the value of the given TYPE variable:mongo_db_backup: image: 'mongo:3.4' volumes: - '/backup:/backup' command: sh -c '$$(echo $TYPE)'But instead I get the errorThe TYPE variable is not set. Defaulting to a blank string.What am ...
It happens that Compose expands$TYPEbefore it gets to the inside of the container. Compose looks for the$TYPEenvironment variable in the shell or host environment and substitutes its value in.This will work with the following terminal command:docker-compose.ymlcommand: sh -c 'echo $TYPE'terminal commandTYPE='hello worl...
openVPN inside docker image
I am trying to create a docker image which has a python script that connects to an API through VPN using openVPN, however, I cannot seem to get openVPN to be working.I my docker file I have# Install openVPN and get confi files RUN mkdir /config ADD ./config/. /config RUN apt-get install -y openvpn # Run openvpn and s...
Run ovpn with a deamon in DockerfileCMD openvpn --daemon --config config/fremsyn.ovpn --auth-user-pass config/login.txt --askpass config/password.conf && python3 src/cli/getStatus.pyFor run the service use docker-compose.yml like this :docker-compose.ymlversion: "3.3" services: name_of_your_service: image: your_...
Connect to remote docker host
I have following scenario.Two Machine ( Physical Machine)One is Windows 10 With Docker On Windows Installer and same way ubuntu 18.04 with docker-ce installed.I can run command on individual and that is fine.I want to connect Ubuntu Docker Host from Docker on Windows machine. So Docker CLI on Windows Point to deamon at...
You will need to enable docker remote API on Ubuntu Docker Host by adding below settings in daemon.json or your startup script[root@localhost ~]# cat /etc/docker/daemon.json { "hosts": [ "unix:///var/run/docker.sock", "tcp://0.0.0.0:2376" ] }Once you restart docker you can connect to docker host locally by socket fil...
How to fetch Certificate from Azure Key vault to be used in docker image
I am using a ssl certificate while building the docker image to communicate with other different services with in the Kubernetes. right now I have the ssl certificate in my repo and will be published as part of the artifact. we are planning to move the cert to key vault and fetch it while executing our pipeline. I am n...
Okay, Here is How I solved my current scenario. as updated in the question I was able to read the certificate from key vault. next piece was to access the cert within the docker file, since docker doesn't know the location(because its not part of the context), Its not able to read the cert. so, what I have done is used...
Environment variables and @Value can't work together on Spring Boot
I have a Spring boot app that connects to a Redis instance that works as a cache. When I'm in dev environment, I have the following:--- spring: profiles: default redis: host: localhost port: 6379And my cache configuration class is like this:@Configuration @EnableCaching public class CacheConfiguration { @Va...
Based on theDocker documentation:Compose uses Docker links to expose services containers to one another. Each linked container injects a set of environment variables,each of which begins with the uppercase name of the container.Docker Compose would create an Environment Variable representing theFull URLof the contain...
Unable to mount a file with docker-compose
I rundocker-compose -f docker-compose.prod.yml upand I immediately get the error:ERROR: for frontend Cannot start service frontend: OCI runtime create failed: container_linux.go:348: starting container process caused "process_linux.go:402: container init caused \"rootfs_linux.go:58: mounting \\\"/c/Users/James/Project...
You can only mount host directories as volumes, and not individual files in Docker.In yourvolumesdefinition, instead of this:- ${PWD}/frontend/conf/nginx/mysite.template:/etc/nginx/conf.d/default.confyou should do this:- ${PWD}/frontend/conf/nginx:/etc/nginx/conf.d
connect to docker hosted on remote server
How do I connect to remote docker host using python?>>> from docker import Client >>> cli = Client(base_url='tcp://52.90.216.176:2375') >>> >>> cli.containers() Traceback (most recent call last): File "", line 1, in File "/usr/local/lib/python2.7/site-packages/docker/api/container.py", line 69, in containers r...
Add tcp option to sys config as shown here:vi /etc/sysconfig/docker OPTIONS="--host=tcp://0.0.0.0:2375"After restarting docker, I could connect to remote docker server using python.
Docker-compose network link
Docker 'link' feature will be deprecated as new feature 'networking' has been released (link). I'm making docker-compose with some containers, and it was fine with 'link' to connect each others(without any other commands).Since I need to change link configuration to network, I have to make docker network before 'docker...
By default, docker-compose with a v2 yml will spin up a network for your project. Any networks you define will also be created unless you explicitly tell it otherwise. Here's an example docker-compose.yml:version: '2' networks: dbnet: appnet: services: db: image: busybox command: tail -f /dev/null n...
Superset for Clickhouse in docker with SQLAlchemy
I'm trying to setup Apache Superset for Clickhouse. My understanding so far is that I need to install SQLAlchemy for Clickhousehttps://github.com/xzkostyan/clickhouse-sqlalchemyI'm in Ubuntu 16.04 LTS, and using the Docker vanilla version of Clickhouse and of Superset:https://store.docker.com/community/images/yandex/cl...
You don't need to bridge them: what you want is a superset server (that you happen to be running via docker) to connect to a clickhouse database (that you also happen to be running via docker).You also shouldn't need to install SQLAlchemy for Clickhouse: looking at the dockerfile athttps://hub.docker.com/r/amancevice/s...
Running mnist_softmax.py on Tensorflow Installed with Docker
I installed Tensorflow on Ubuntu 16.04 LTS following the tutorial given here (with GPU support):Docker Installation for TensorflowManaged to run docker with this command:nvidia-docker run -it -p 8888:8888 -v /home/myusername/notebooks:/notebooks gcr.io/tensorflow/tensorflow:latest-gpu docker exec -it [my_DOCKER_ID] b...
I had the same problem and it was caused by running tutorial code from a later version (eg v0.12) against an older version of tensorflow which was in my docker container (v0.11 in my case). The same problem is discussed here:https://github.com/tensorflow/tensorflow/issues/5643The app.run() method didn't have the argv p...
$(pwd) - one level up
I'm pretty new to the bash/shell script world, I'm trying to do the below and it could be pretty simple but I wasn't able to figure out the command, would be great if someone could help me out here and also point me to some documentation wrt to shell script topics. Thank you in advance.My build.sh and Dockerfile reside...
The last arg todocker build, often something likedocker build .is the build context in docker. This directory is sent to the server where the build runs and allCOPYandADDcommands are performed using this context. These commands do not run on the client, and docker is a client/server application, so anything not in that...
Sharing files between container and host
I'm running a docker container with a volume /var/my_folder. The data there is persistent: When I close the container it is still there. But also want to have the data available on my host, because I want to work on code with an IDE, which is not installed in my container.So how can I have a folder /var/my_folder on my...
Link :Manage data in containersThe basic run command you want is ...docker run -dt --name containerName -v /path/on/host:/path/in/containerThe problem is that mounting the volume will, (for your purposes), overwrite the volume in the containerthe best way to overcome this is to create the files (inside the container) t...
Docker as a builder, can't install systemd header files
I'm trying to update a Docker image based on the official CentOS7 image. It is used as a builder for Node.js projects.I need to add thesystemd-develpackage for compiling some dependencies, but this fails with the following error:fakesystemd-1-17.el7.centos.noarch has installed conflicts systemd: fakesystemd-1-17.el7.ce...
fakesystemdis a special package in the CentOS Docker image that satisfies the dependency to Systemd without actually installing Systemd (after all, you don't usually need an init system within a container).yum info fakesystemdtells a bit more:Minimal docker-specific package to satisfy systemdProvides:without installing...
How do you run an .exe file on Docker?
I am currently trying to understand and learn Docker. I have an app, .exe file, and I would like to run it on either Linux or OSX by creating a Docker. I've searched online but I can't find anything allowing one to do that, and I don't know Docker well enough to try and improvise something. Is this possible? Would I ha...
Docker allows you to isolate applications running on a host, it does not provide a different OS to run those applications on (with the exception of a the client products that include a Linux VM since Docker was originally a Linux only tool). If the application runs on Linux, it can typically run inside a container. If ...
is port not common for all the docker networks?
I have created two docker networkschnetworkdocker network create --subnet=172.19.0.0/16 chnetworkInternal-networkdocker network create --internal --subnet 10.1.1.0/24 internal-networkwhile create docker container I usechnetwork,docker run -it -d --name containerone -h www.cone.net -v /var/www/html -p 3006:80 --net chn...
This appears to be the behavior of internal networking. Since the only network attached to the container is an internal network which doesn't permit external traffic, the container becomes isolated by design. To publish a port, you need the container to be attached to a non-internal bridged network. And as soon as you ...
Docker Passing an argument Docker Entrypoint with entrypoint.sh [duplicate]
This question already has answers here:How to pass ARG value to ENTRYPOINT?(5 answers)Closed4 years ago.I tried to pass an argument to my docker entry point , but it fails , these are steps i followedDocker Build Command : docker build -t "DBDNS" --build-arg db=sampleIn DockerfileARG db ENV database ${db} ENTRYPOINT [...
Entrypoint cannot have a a variable. You can either move it to CMD or directly access it indocker-entrypoint.shARG db ENV database ${db} ENTRYPOINT ["/docker/entrypoint.sh"] CMD ["${db}"] -----------ENTRYPOINT--------------------- #!/usr/bin/env bash echo "Entrypoint stuff" echo "----------------" echo "NEW APP DB C...
Docker is unable to delete a file when building images
My DockerFile contains the following instruction:rm -f plugins.7zThis command worked as expected in earlier versions of docker but fails with version 1.13. I see the error:cannot access plugins.7z: No such file or directoryIf I bring up a container with the base image and execute the command manually, I see the same er...
The reason removing directories fails is that the backing (xfs) filesystem was not formatted with d_type support ("ftype=1"); you can find a discussion on github;https://github.com/docker/docker/issues/27358.To verify ifd_typesupport is available on your system, check the output ofdocker info;Server Version: 1.13.1 Sto...
Is it a bad practice to use version managers like RVM inside docker containers?
I'm new to using docker and so far I'm unable to find many ruby/rails images that containRVMorrbenv.The most common thing I see is that eachcontainerhas multipletagsand each tagged image version hasonly oneversion of Ruby installed. See thisimagefor example.The only way to use another version is to use another tag for ...
This would be considered a bad practice or anti-pattern in docker. RVM is trying to solve a similar problem that docker is solving, but with a very different approach. RVM is designed for a host or VM with all the tools installed in one place. Docker creates an isolated environment where only the tools you need to run ...
How to access docker-compose created replicas in haproxy config
I have a simple haproxy.cfg that looks like this:frontend http bind *:8080 mode http use_backend all backend all mode http server s1 ws:8080Now I have a docker-compose file that looks like this:version : '3.9' services: lb: image: haproxy ports: - "8080:8080" ...
To accomplish this using docker-compose there are two things you should consider:Set your resolver in HAProxy to use Docker's internal DNS at127.0.0.11.Use aserver-templatein your HAProxy configuration.Using Docker's DNS in the configuration will allow HAProxy to use it as a service discovery mechanism when we define t...
.NET 8.0 WebAPI/Swagger Docker Refused to connect
I migrated my application to .NET 8.0, ran it locally and it works perfectly.Then I created an image, the container. As a result, the page that was working before now returns a "1.2.3.4 refused to connect."Before, when I was in .NET 7.0, the API worked.My basic DockerFileFROM mcr.microsoft.com/dotnet/sdk:8.0 AS build-e...
.NET 8 ASP.NET Core Docker images have a breaking change -Default ASP.NET Core port changed from 80 to 8080:The default ASP.NET Core port configured in .NET container images has been updated from port 80 to 8080. We also added the newASPNETCORE_HTTP_PORTSenvironment variable as a simpler alternative toASPNETCORE_URLS.P...
localhost refuses connection with docker
I'm totally new to docker and I tried to run the example image from the "get started" tutorial.My OS is Windows 10 Home (64 bit) and I used Docker Toolbox to install it. I created the 3 files like the demo told me to do and copied the content into them to avoid typing errors. When I start the image withdocker run -p 40...
You need to run the following command with your container name to obtain the IP for the container.docker inspect --format='{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' You can then access the containerhttp://IP_Obtained:Port.Detailed Explanation can be found athttps://docs.docker.com/docker-for-windows/tro...
How to read Powershell variable inside Dockerfile?
I'm buildingDocker Desktop for Windowsimage. I try to pass a variable to a Powershell command, but it does not work.Dockerfile# escape=` FROM microsoft/windowsservercore SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] RUN $someVar="2.60.3" ; echo $someVar...
Double-quotes need to beescapedfor them to work as expected, like sosomeVar=\"2.60.3\".
How to pass json file as an argument using docker run command
Below is my Dockerfile content:FROM python:2.7-slim # Set the working directory to /app WORKDIR /app # Copy the current directory contents into the container at /app ADD . /app RUN pip install numpy==1.12.0 CMD ["python", "t_1.py", "t_1.json"]I want to pass this file(t_1.sjon) as argument with docker run command at...
What you should use isENTRYPOINTFROM python:2.7-slim # Set the working directory to /app WORKDIR /app # Copy the current directory contents into the container at /app ADD . /app RUN pip install numpy==1.12.0 ENTRYPOINT ["python", "t_1.py"]Now when you run the docker commanddocker run -v ./t_1.json:/data/t_1.json /...
DisabledBackend: Erratic Behavior with Celery, Redis & Flask
I've been using Celery for a while a now, in production I use RabbitMQ as the broker and Redis for the backend in a K8s cluster with no problems so far. Locally, I run a docker compose with a few services (Flask API, 2 different Workers, Beat, Redis, Flower, Hasura), using Redis as both the Broker and the Backend.I hav...
So it seems that I need to accessAsyncResultonly via my Celery app instance, instead of through Celery, or pass the Celery app instance as an argument.So, this doesn't work:from celery.result import AsyncResult @app.route('/status/') def get_status(task_id): task = AsyncResult(task_id) return task.stateThis wo...
Incrementing GB of Ram for Docker Container in Windows
I am following this tutorialhttps://docs.docker.com/docker-for-windows/#docker-settings-dialogto install docker in windows. I am stuck on the Settings section under Resources tab. My view of resources does not show how it is showing on that link. Is there a way to increase my Ram so I can have ELK to run. I installed t...
Though you mention using Hyper-V, because of your screenshot (notably the WSL Integration tab), I suspect you may be running Docker Desktop in WSL2 mode, instead of HyperV mode. (WSL2 to my understanding is the newer, faster option in many cases).With that assumption, to alter the RAM in your WSL 2 VM, you have to crea...
Why is docker-compose ps different from docker ps?
Why does docker compose create containers that are only accecible from docker-compose ps and that persist after killing running container ?
It doesn't.docker psonly shows running containers,docker-compose psshows all containers related to the current compose file, running and stopped.docker-compose killjust force stops the container and it can be restarted withdocker-compose start, it will therefore be visible when runningdocker-compose psbut notdocker ps....
Nodemailer with Docker
I'm trying to send some emails from a docker container running express through register365.This is the code usedexport class Emailer { transporter: nodemailer.Transporter; constructor() { this.transporter = nodemailer.createTransport(smtpTransport({ host: 'smtp.reg365.net', auth: { user:...
Create a file/etc/docker/daemon.json{ "dns": ["89.101.160.5", "89.101.160.4"] }Restart the docker service and try again and see if this works for you.You are probably on office network which has its own DNS servers that you should be using. So you need to tell the Docker daemon which DNS server its containers should be...
Node app docker image runs locally and fails on Amazon ECS
The app deploys and runs just fine locally for long periods of time without issue. On Amazon ECS, however, it seems to always crash after running idle for roughly 2:30 min. What's wrong?Dockerfile# Set the node alpine base image FROM node:15-alpine # Establish app working directory WORKDIR /app # Setup app workspace ...
The issue was with the ELB Health Check. The default location for the health check was on path '/', and due to the design of the web app, that location was not returning 200 OK. Configuring the health check path to something that returns 200 OK solved the issue. Also, considering the health check grace period on the EC...
cant connect to kafka from external machine
I´m starting with Apache Kafka and i´m facing problems when i try to conect from an external machine.With this configuration bellow, all works fine if the application and the docker are running at the same machine.but when i put the application in machine A and docker at machine B, the application cant connect.My sprin...
Some mix of @Krishas and @Hans JespersenHere is the code of my docker yml:version: '2' services: zookeeper: image: wurstmeister/zookeeper:3.4.6 ports: - 2181:2181 kafka: image: wurstmeister/kafka:0.10.1.1 environment: KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://...
How can I pass container level arguments in azure container create
When I run docker locally"docker run -it -p 8080:8080 codercom/code-server --auth none"I am using --auth none argument, but how can i use this in azure container create commands.If I run normally like"az container create --resource-group learn-deploy-vsCode --name code-server --image codercom/code-server --auth ...
When you run the commanddocker run -it -p 8080:8080 codercom/code-server --auth nonelocally, it means you add the parameter--auth nonefor the command in the link you provide. But when you run the CLI command with the parameter--auth none, the Azure CLI will look it as the parameter of the CLI commandaz container create...
How to store server_key_rsa in docker-compose.yml?
I need to store the server_key_rsa of my sftpServer in a docker-compose.yml but I don't know how to store itIt's look like that for now :-----BEGIN RSA PRIVATE KEY----- ***********************My Key bla bla bla....... ********************************************** ********************************************** ********...
Thesecrets definition in the docker-compose.yml file, as of version 3.3 of the file format, does not support passing the content of the secret inside the docker-compose.yml file itself. The secret needs to be either external (predefined withdocker secret create secret_name -) or from the contents of a separate file.The...
Kubernetes deployment high memory usage
I am using python flask in GKE contianer and moemory is increasing inside pod. I have set limit to pod but it's getting killed.I am thinking it's memory leak can anybody suggest something after watching this. As disk increase memory also increase and there are some page faults also.Is there anything container side linu...
If you added a resource memory limit to each GKE Deployment when thememory limitwas hit, the pod was killed, rescheduled, and should restarted and the other pods on the node should be fine.You can find more information by running this command:kubectl describe pod kubectl top podsPlease note if you put in a memory req...
How to run commands when a docker image runs?
I have a consul docker image which is a part of adocker-composeenvironment.I have to run the commandconsul acl bootstrapinside the docker container, I believe mentionining it incommandorentrypointwill override the default commands set for consul, how do I execute it in addition to the default commands?
There is no option in docker-compose to allow you to run a command after a container is started.What you can do is to build your own image that will execute the actions you want on startup. To do this you need to:Find out the default startup of the container (theENTRYPOINTandCMDcombined).Create a shell script that will...
docker reverse proxy DNS/networking issues
I'll try to explain and draw this outWhat I want to achieve:Sorry for the crappy paint diagram. Right now, it works perfectly if I hit it from the 10.10.10.0 network. The problem is DNS resolves jenkins.network.com to the 10.10.10.0 network. I want to go back through the proxy though as that has SSL termination to get ...
Since you didn't post your compose. I am making few assumptions. The compose assumed is belowversion: '3' services: nginx: image: nginx ports: - 80:80 - 443:443 depends_on: - jenkins - sonar jenkins: image: jenkins sonar: image: sonarqubeAnd all of these run on10.10.10...
Local npm dependency "does not a contain a package.json file" in docker build, but runs fine with npm start
I have an npm module I'm working on locally that is a dependency in a client app.Directory structure is basically the following:/app /client /src App.js package.json Dockerfile.dev /shared /contexts package.json test.js /hooksMypackage.jsonis the following:{ "name": "web", ...
Ok, this works. I changed myDockerfile.devto the following:FROM node:alpine WORKDIR '/app' COPY ./shared /shared COPY ./web /app RUN npm install CMD ["npm", "run", "start"]From the base project directory (where/sharedand/webreside), I run:docker build -t sockpuppet/client -f ./web/Dockerfile.dev .
Docker permission denied with volume
I'm trying to start a Nginx container that serve static content located on the host, in /opt/content.The container is started with :docker run -p 8080:80 -v /opt/content:/usr/share/nginx/html nginx:alpineAnd Nginx keeps giving me 403 Forbidden. Moreover, when trying to inspect the content of the directory, I got strang...
The problem was caused by SELinux that prevented Docker to access the file system.If someone has the same problem than this post, here is how to check if it's the same situation :1/ Check SELinux status:sestatus. If the mode isenforcing, it may block Docker to access filesystem.# sestatus SELinux status: ...
Install / add nodejs into (Jenkins) docker image permanently
How can I (best) install/add nodejs permanently into a (Jenkins) docker image?The result is a docker image with both Jenkins and nodejs.The purpose is to install nodejs as a Global Tool in the Jenkins container. To achieve theinstallation folder of nodejshas to be known.I saw e.g. this solution, but what is the install...
Installing nodejs on top of the jenkins image is the way to go. Adding an instruction to install nodejs inside the Dockefile is a standard thing in Docker to do when packaging dependencies.Adding nodejs (later) automatically at Jenkins build time is not a good thing, because it slows the build process down.This is no...
No reachable servers on static linked go binary
Depending on where my binary is being executed, I get different results on mgo Dial.Right now, I'm building on my machine (Fedora: uname -a: Linux localhost.localdomain 4.15.6-300.fc27.x86_64 #1 SMP Mon Feb 26 18:43:03 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux) using the following command:$ CGO_ENABLED=0 GOOS=linux GOARC...
Just solved the mystery. It's indeed related to the docker base image, and not to the build step.It'll work perfectly if I do:FROM debian RUN apt-get update RUN apt-get install -y ca-certificatesAs my goal is to use the alpine image, I'm using the following right now:FROM alpine RUN apk --no-cache add ca-certificatesHo...
How to set copy all environment variables from root user to another specific user
In my docker container I am running a command as a specific user like this fromentrypoint.sh:sudo -u appuser "$@"This works fine, however, it doesn't set any of the environment variables that get created by using the--linkoption while running the container.QuestionIs it possible to set all environment variables that ex...
Thesudocommand, because it is designed as a tool for privilege escalation, intentionally sanitizes the environment before switching to a new user id. If you take a look at thesudoman page, you'll find:-E, --preserve-env Indicates to the security policy that the user wishes to preserve their existing ...
Docker Named Volume on another Partition on another hard drive
I have a Docker container running on my PC. The main functionality of the container is to scrape data, and this accumulates 0.3GB/day. I'll only be needing this data for the last 30 days, and after this I plan to store it archived on Hard Disk Drives for historical purposes. However after few hours of trials and error...
In case of docker volumes, you don't have control over where docker saves it's volumes. all you can do is just to change docker root directory. so it's better to mount your new partition under a directory and then change docker root directory to this mount point. this way you can achieve what you want. also you should ...
How to get first key from object using docker inspect --format (get name of network of container)
I have command like this:$ docker inspect reacthublh_mysql_1 -f "{{json .NetworkSettings.Networks }}"which extract for me output:{"reacthublh-network":{"IPAMConfig":null,"Links":null,"Aliases":["1b905711e127","mysql"],"NetworkID":"d2b6bd4815a2eb48a57d05e5d219894f453c15e3f8b5a331a5f0668ed98f4730","EndpointID":"c71240571...
Thedocker inspect -foption uses the Gotext/templatelanguage, with fairly few extensions. I don't think it's directly possible to print only the first network name, but it is possible to print out all of the network names and no other details. The trick here is to iterate over thatNetworksobject as a map and print out...
Sending Multicast Packets from Docker Container (to multicast group)
I have an application that sends messages over UDP multicast that I've been attempting to put under docker. I've been running into much headwind trying to send multicast packets from a docker container.I have been able to send messages through the--net=hostoption on running the docker container. I would, however, like ...
Docker network drivers have no IGMP/PIM support, so you should really establish a direct Layer 2 connection from the container to the physical switch/router.As you have found out yourself, docker's default bridge network will not help you here.I haven't tested it with multicast, but you should be able to achieve that w...
Build Docker image using GitHub Actions: No such file or directory
We intend to use Git Actions to build our Docker on every commit.This is our current Git Actions yml:# This is a basic workflow to help you get started with Actions name: CI # Controls when the workflow will run on: push: branches: - '**' pull_request: branches: - '**' # Allows you to run ...
See the docshere:Eachrunkeyword represents a new process and shell in the runner environment. When you provide multi-line commands, each line runs in the same shell.This means that the working directory isn't persisted after thecdstep. Yourlsstep works because you explicitly set the working directory for it.You have to...