dockerfile

Is there a way to change date of Azure App Service which had a linux based container deployed

不想你离开。 提交于 2021-01-28 20:10:05
问题 I need to change the date / time of my Azure App Service. This will help me in time travelling the API to a past date. I have used linux based image of .Net Core API, deployed as container in Azure App Service. In this API I have a method which currently returns the system date and time. I know there is a way to set the timezone. This can be part of the dockerfile. I am trying to look for a similar way to change the date. 回答1: There are multiple ways to get the current time. You can set the

Pass argument to python script running in a docker container

℡╲_俬逩灬. 提交于 2021-01-28 15:15:45
问题 Suppose the following setup: Website written in php / laravel User uploads a file (either text / doc / pdf) We have a docker container which contains a python script for converting text into a numpy array. I want to take this uploaded data and pass it to the python script. I can't find anything which explains how to pass dynamically generated inputs into a container. Can this be done by executing a shell script from inside the laravel app which contains the uploaded file as a variable

Pass argument to python script running in a docker container

拟墨画扇 提交于 2021-01-28 15:07:27
问题 Suppose the following setup: Website written in php / laravel User uploads a file (either text / doc / pdf) We have a docker container which contains a python script for converting text into a numpy array. I want to take this uploaded data and pass it to the python script. I can't find anything which explains how to pass dynamically generated inputs into a container. Can this be done by executing a shell script from inside the laravel app which contains the uploaded file as a variable

source in every Dockerfile RUN call

拜拜、爱过 提交于 2021-01-28 11:22:40
问题 I have a Dockerfile, where I am finding myself constantly needing to call source /opt/ros/noetic/setup.bash . e.g.: RUN source /opt/ros/noetic/setup.bash \ && SOME_COMMAND RUN source /opt/ros/noetic/setup.bash \ && SOME_OTHER_COMMAND Is there a method to have this initialised in every RUN call in a Dockerfile? Have tried adding to ~/.bash_profile and Docker's ENV command with no luck. 回答1: TL;DR: what you want is feasible by copying your .sh script in /etc/profile.d/ and using the SHELL

Dockerfile image build: “RUN wget” inside the Dockerfile results in partial file download, but the build completes with no errors

元气小坏坏 提交于 2021-01-28 08:32:08
问题 As stated in the title. Also, same result with curl, also same results regardless of if using the plain RUN versus EXEC mode of RUN with the wget and its args all inside [ ] The container builds with no errors and when I run it via hijack of the entrypoint with bash I see only a few hundred bytes of the file was actually downloaded, also then from inside the running container I can then wget the complete file and run it. Did a lot of googling and dont see anyone else with this. ??? FROM

How can I use a command from another container using Docker Compose?

爷,独闯天下 提交于 2021-01-28 06:07:10
问题 I have two Dockerfiles: one for adonis (with node docker's hub image) and another for mongo (with mongo docker's hub image). The mongo_service must depend on adonis service because I only want to run adonis after starting all the mongo instances. Therefore, on the end of the mongo dockerfile I run a script which in the end will run: adonis seed adonis serve The error that I'm having is: adonis: command not found I understand that somehow the mongo_service is not having access to the adonis

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

Allow Docker strategy in Openshift 3

旧时模样 提交于 2021-01-27 15:57:51
问题 I'm trying to understand the new OpenShift system and now we have push images to it. I know a little about Docker and I wanted to use it. I read in some places that we can chose Docker as a strategy. So basically I created an image based on httpd and a basic html file and tried to push it with the following command from the project folder: oc new-app . --strategy=docker I get this message on console: error: buildconfigs.build.openshift.io "openshift" is forbidden: build strategy Docker is not

docker: failed to register layer: re-exec error: exit status 1: output: ProcessBaseLayer . The system cannot find the path specified

孤人 提交于 2021-01-27 08:00:49
问题 Am trying to pull an image from docker hub. docker pull zuehlke/shiny And am facing below error: docker: failed to register layer: re-exec error: exit status 1: output: ProcessBaseLayer C:\ProgramData\Docker\windowsfilter\d2dab1878cf591d869d33aa2c4cd410cd92614a44c776041c506fc765c1a98f1: The system cannot find the path specified. Am having Docker for Windows: docker version Client: Version: 17.09.0-ce API version: 1.32 Go version: go1.8.3 Git commit: afdb6d4 Built: Tue Sep 26 22:40:09 2017 OS

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