docker-compose

Trying to install DOCKER GPG key recieving error: Curl: option '-' is unknown

时光怂恿深爱的人放手 提交于 2021-01-27 18:00:01
问题 I'm trying to add the docker GPG key, and I'm unable to do so because it doesn't recognize that i'm trying to pipe the GPG key into the APT KEY I'm getting back the following error (see picture): curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - 回答1: You seems to have a Keyboard mapping issue where the pipe | turns into a redirect symbol > . It seems more related to Digital Ocean and their Console itself where your droplet is hosted - by the look of the image in the

Docker and net core application doesn't work

陌路散爱 提交于 2021-01-27 17:18:32
问题 I trying setting up dotnet application with Docker. Dockerfile in "backend" folder: FROM microsoft/dotnet:1.1-sdk AS build-env WORKDIR /app COPY *.csproj ./ RUN dotnet restore COPY . ./ RUN dotnet publish -c Release -o out FROM microsoft/dotnet:1.1-runtime WORKDIR /app COPY --from=build-env /app/out ./ CMD ["dotnet", "backend.dll"] Dockerfile in "frontend" folder: # build FROM node AS build-env WORKDIR /usr/src/app COPY package.json /usr/src/app/ RUN npm install COPY . /usr/src/app/ RUN npm

Composer install with dockerfile

拈花ヽ惹草 提交于 2021-01-27 17:07:44
问题 I'm pretty new with docker, I try to automatically execute composer install within my Dockerfile but it seems that I can't cd into my application while installing, what's wrong? Or maybe there is another better way to do that? my docker-compose.yml version: "3.1" services: app: image: nginx:alpine container_name: app working_dir: /application volumes: - ./Projects/app:/application/app - ./Docker/nginx/app.conf:/etc/nginx/conf.d/app.conf ports: - "8080:8080" php-fpm-app: build: Docker/php-fpm

Docker and net core application doesn't work

本秂侑毒 提交于 2021-01-27 16:56:28
问题 I trying setting up dotnet application with Docker. Dockerfile in "backend" folder: FROM microsoft/dotnet:1.1-sdk AS build-env WORKDIR /app COPY *.csproj ./ RUN dotnet restore COPY . ./ RUN dotnet publish -c Release -o out FROM microsoft/dotnet:1.1-runtime WORKDIR /app COPY --from=build-env /app/out ./ CMD ["dotnet", "backend.dll"] Dockerfile in "frontend" folder: # build FROM node AS build-env WORKDIR /usr/src/app COPY package.json /usr/src/app/ RUN npm install COPY . /usr/src/app/ RUN npm

How to organize shared libraries with docker and monorepo

[亡魂溺海] 提交于 2021-01-27 15:13:22
问题 What I have I have 2 python apps that share a few bits of code, enough that I am trying to isolate the shared parts into modules/packages/libraries (I'm keeping the term vague on purpose, as I am not sure what the solution is). All my code is in a monorepo, because I am hoping to overcome some of the annoyances of managing more repos than we have team members. Currently my file layout looks like: + myproject + appA | + python backend A | + js frontend + appB | + B stuff + libs + lib1 + lib2

Docker-compose: replace “build”-based service with pre-built image in production?

久未见 提交于 2021-01-27 08:11:19
问题 Let's say we have the following docker-compose.yml : version: '3' services: db: image: "postgres" ports: - "5432:5432" environment: - POSTGRES_PASSWORD=mysecretpassword web: build: web depends_on: [ db ] ports: - "80:80" The first service, db , just runs a container with the official postgres image from Docker Hub. The second service, web , first builds a new image based on the Dockerfile in a folder also called web , then runs a container with that image. While developing, we now can

Docker-compose: replace “build”-based service with pre-built image in production?

谁都会走 提交于 2021-01-27 08:05:04
问题 Let's say we have the following docker-compose.yml : version: '3' services: db: image: "postgres" ports: - "5432:5432" environment: - POSTGRES_PASSWORD=mysecretpassword web: build: web depends_on: [ db ] ports: - "80:80" The first service, db , just runs a container with the official postgres image from Docker Hub. The second service, web , first builds a new image based on the Dockerfile in a folder also called web , then runs a container with that image. While developing, we now can

Docker-compose: replace “build”-based service with pre-built image in production?

三世轮回 提交于 2021-01-27 08:01:08
问题 Let's say we have the following docker-compose.yml : version: '3' services: db: image: "postgres" ports: - "5432:5432" environment: - POSTGRES_PASSWORD=mysecretpassword web: build: web depends_on: [ db ] ports: - "80:80" The first service, db , just runs a container with the official postgres image from Docker Hub. The second service, web , first builds a new image based on the Dockerfile in a folder also called web , then runs a container with that image. While developing, we now can

Docker Compose: How to specify path to docker file while building as if in different directory?

时光总嘲笑我的痴心妄想 提交于 2021-01-27 07:20:47
问题 docker build -t test2 -f tests/low_conviction_integration/Dockerfile . If I need to copy a file from a directory ABOVE my Dockerfile, I can accomplish it by calling docker build -t image_name -f path_to_docker_file/Dockerfile . from that ABOVE directory How can I accomplish the same behavior with docker-compose? I want docker-compose to exist in same directory as Dockerfile, to build with Dockerfile, but to ultimately call it as if it was in ABOVE directory, so that I can copy the correct

Docker Compose: How to specify path to docker file while building as if in different directory?

淺唱寂寞╮ 提交于 2021-01-27 07:16:51
问题 docker build -t test2 -f tests/low_conviction_integration/Dockerfile . If I need to copy a file from a directory ABOVE my Dockerfile, I can accomplish it by calling docker build -t image_name -f path_to_docker_file/Dockerfile . from that ABOVE directory How can I accomplish the same behavior with docker-compose? I want docker-compose to exist in same directory as Dockerfile, to build with Dockerfile, but to ultimately call it as if it was in ABOVE directory, so that I can copy the correct