Docker

Azure Container Instances - from where to execute “docker login” before we execute “az container create” command

一曲冷凌霜 提交于 2021-02-11 12:39:39
问题 we need to deploy ACI - Azure Container Instance in private virtual network. We followed the example and prepared YAML file from this link. https://docs.microsoft.com/en-us/azure/container-instances/container-instances-vnet So now we need to execute before that our command: az container create --resource-group myResourceGroup --file vnet-deploy-aci.yaml in that yaml we are referencing our image, similarly like from the above example (just we are using our private repo ) image: mcr.microsoft

Chocolatey generated VS 2015 Compiler not found on docker image

天涯浪子 提交于 2021-02-11 12:34:04
问题 I tried to install visual studio 2015 build tools on a Docker Container using the chocolatey packet manager. I need it for a Matlab code gen build operation. The chocolatey steps works fine. But my docker container can't find the compiler. Any Hints? Docker RUN powershell -command choco install -y vcredist140 RUN powershell -command choco install -y vcbuildtools -ia "/Full" Using mex -v -setup I have: Host(WIN10): ... Looking for compiler 'Microsoft Visual C++ 2015 (C)' ... ... Looking for

How do I Run Docker cmds Exactly Like in a Dockerfile

試著忘記壹切 提交于 2021-02-11 12:33:31
问题 There seems to be a difference between how Docker runs commands in a Dockerfile versus running commands manually after starting a container. This seems to be due to the kind of shells you can start, a (I assume) non-interactive shell with a Dockerfile vs an interactive one when running something like docker run -it <some-img-id> . How can I debug running commands in a Docker container so that it runs exactly like the commands are run from a Dockerfile? Would just adding /bin/bash --noprofile

Startup FreeIPA with docker not working after install

半城伤御伤魂 提交于 2021-02-11 12:30:15
问题 I'm use these how to install the FreeIPA with Docker (centos7) [https://hub.docker.com/r/freeipa/freeipa-server/ ] and I do not see any errors after these command: ` docker run --name freeipa-server-container -ti -h ipa.labs.net -v /sys/fs/cgroup:/sys/fs/cgroup:ro --sysctl net.ipv6.conf.all.disable_ipv6=0 --cap-add=SYS_ADMIN --tmpfs /run --tmpfs /tmp -v /var/lib/ipa-data/ipa:/data:Z freeipa-server:centos7 exit-on-finished --no-ntp ............. The ipa-client-install command was successful

How to connect to other container from Dockerfile while docker-compose build

余生长醉 提交于 2021-02-11 12:29:26
问题 I try to configure docker compose for my php project. On deploy I want to update a source code, update composer dependencies and run database migrations. So I have a docker-compose.yml file: version: '3.0' services: php: build: context: . dockerfile: php/Dockerfile depends_on: - postgres postgres: image: "postgres:13-alpine" restart: always environment: POSTGRES_USER: ${POSTGRES_USER} POSTGRES_PASSWORD: ${POSTGRES_PASSWORD} POSTGRES_DB: ${POSTGRES_DB_NAME} Php container builds from the next

Set environment variables in Docker container

*爱你&永不变心* 提交于 2021-02-11 12:27:38
问题 I want to know if what I'm doing is considered best practice, or is there a better way: What I want I want to have a Docker image, which will have some environment variables predefined when run as a container. I want to do that by running some shell script that will export those variables. What I'm doing My dockerfile looks like this: Dockerfile code.. .. .. RUN useradd -m develop RUN echo ". /env.sh" >> /home/develop/.bashrc USER develop Is that a good way? 回答1: Using the Dockerfile ENV

docker-compose mongo unable to authenticate after initialising with custom admin password

China☆狼群 提交于 2021-02-11 12:27:36
问题 This is my docker-compose file docker-compose.yml version: "3.1" services: mongo1: container_name: mongo1 image: mongo restart: always environment: MONGO_INITDB_ROOT_USERNAME: ${MONGO_USER} MONGO_INITDB_ROOT_PASSWORD: ${MONGO_PASS} MONGO_INITDB_DATABASE: ${MONGO_DB_NAME} ports: - 27017:27017 - 28017:28017 env_file: - .env volumes: - volume-mongo:/data/db - ./mongo/init-mongo-js.sh:/docker-entrypoint-initdb.d/init-mongo.sh:ro command: ['--auth', '--wiredTigerCacheSizeGB=1'] networks: - mongo

Environment variable not injected into multi stage docker build on Azure Devops pipeline

江枫思渺然 提交于 2021-02-11 12:23:03
问题 I have a docker file that I can build locally without issues, on Azure Devops the variable is not set properly. E.g. locally I can run a multi-stage docker build where artifacts are fetched from an Azure artifact repository with authorization. The authorization token can be set locally without issues. On the build pipeline I haven't been able to inject it properly. The docker file: FROM gradle:5.4.1-jdk8 AS build ARG AZURE_ARTIFACTS_ENV_ACCESS_TOKEN ENV AZURE_ARTIFACTS_ENV_ACCESS_TOKEN $AZURE

How to configure Shebang line of internal Python Tools

蹲街弑〆低调 提交于 2021-02-11 12:20:42
问题 I am trying to build a minimal docker image, capable of nothing more but running the Python interpreter. During development I start from alpine, the final image will be build FROM scratch . I am working on a Linux Mint machine. I am able to compile the Python compiler and install it into my current working directory like this: cd Python-3.8.7 ./configure --prefix=$PWD/../python make install However, I did not find out how to tweak the --prefix settings correctly so that the created shebangs

How does “volumes” override the docker image's original files with docker-compose?

倖福魔咒の 提交于 2021-02-11 12:11:55
问题 Let's use this docker-compose.yml : version: '2' services: db: image: mysql:5.7 volumes: - ./mysql:/var/lib/mysql # <- important restart: always environment: MYSQL_ROOT_PASSWORD: somewordpress MYSQL_DATABASE: wordpress MYSQL_USER: wordpress MYSQL_PASSWORD: wordpress wordpress: depends_on: - db image: wordpress:latest volumes: - ./wp:/var/www/html # <- important ports: - "8000:80" restart: always environment: WORDPRESS_DB_HOST: db:3306 WORDPRESS_DB_USER: wordpress WORDPRESS_DB_PASSWORD: