logo
down
shadow

Editing files from dockerfile


Editing files from dockerfile

By : Barry Ting
Date : November 22 2020, 10:38 AM
it helps some times I need to add several lines to /etc/sysctl.conf in a docker image. Is there an idempotent way to do this via a dockerfile rather than editing manually and using the docker commit approach? , I would use the following approach in the Dockerfile
code :
RUN   echo "Some line to add to a file" >> /etc/sysctl.conf
RUN   sed -i "s|some-original-string|the-new-string |g" /etc/sysctl.conf


Share : facebook icon twitter icon
No Dockerfile could be found. Please make sure you have a Dockerfile called 'Dockerfile' adjacent to the project file

No Dockerfile could be found. Please make sure you have a Dockerfile called 'Dockerfile' adjacent to the project file


By : user3311181
Date : March 29 2020, 07:55 AM
hope this fix your issue You can specify the path to the Dockerfile using the DockerfileFile property.
Start Visual Studio 2019 as Admin (necessary in my case) Edit targeted .csproj Add the DockerfileFile attribute with the relative path (parent folder in my case) Keep the DockerfileContext as is.
code :
<PropertyGroup>
    <TargetFramework>netcoreapp3.0</TargetFramework>
    <UserSecretsId>secretstuff</UserSecretsId>
    <DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
    <DockerfileContext>.</DockerfileContext>
    <DockerfileFile>..\Dockerfile</DockerfileFile>    
    <GenerateAssemblyInfo>false</GenerateAssemblyInfo>
</PropertyGroup>
How to manage files from dockerfile

How to manage files from dockerfile


By : user3706959
Date : March 29 2020, 07:55 AM
it should still fix some issue If your container has an entrypoint, then when that entrypoint exits, the container is done and docker ps will show an "exited" status. If it also has a command, the entrypoint needs to take responsibility for running it. The most common way is to run it as the last line of an entrypoint script
code :
#!/bin/sh
...
exec "$@"
How can I link files in Dockerfile?

How can I link files in Dockerfile?


By : Sam Eddy
Date : March 29 2020, 07:55 AM
How to configure gulp watchers for browser-sync to inject css when editing sass files AND when editing pure css files?

How to configure gulp watchers for browser-sync to inject css when editing sass files AND when editing pure css files?


By : Daidi Hecht
Date : March 29 2020, 07:55 AM
wish help you to fix your issue Since your SASS always compiles to .css you just need to watch for changes in your .css files. It will fire on SASS change anyway (because .css will be generated and gulp.watch triggered by this .css change). Otherwise you can use exclusions in gulp.watch() and use some kind of pattern (ex. subdirectory) to identify .css files generated from SASS. You can try this one:
Docker tomcat editing configuration files through dockerfile

Docker tomcat editing configuration files through dockerfile


By : Huang.yuqiang
Date : March 29 2020, 07:55 AM
will help you I figured it out. The problem was that the user with which I was executing the build tasks did not have sufficient rights to write stuff in those folders. What I did was add a USER root task to the Dockerfile so it executes all the commands as root.
My Dockerfile now looks like this:
Related Posts Related Posts :
  • Run ansible playbook from docker container and deploy on host machine
  • Docker.IO Filesystem Consistancy
  • Gitlab runner: failure to log in to GitLab Container Registry
  • why docker virtualization is faster vs VM
  • Docker: Caused by: java.nio.file.FileSystemException: ./conf/flow.xml.gz: Resource busy
  • Does Docker use different tools to run containers on different Operating Systems?
  • Kubernetes Setting Up Flannel Pod Network
  • Create Custom Docker Alpine Image
  • Is it possible to create a docker container that contains one or more containers?
  • What are the different ways of implementing Docker FROM?
  • fig invalid repository name error
  • Create dynamic environment variables at build time in Docker
  • Why am I getting an RTNETLINK Operation Not Permitted when using Pipework with Docker containers?
  • Specify the order Dockers run on Kubernetes pod
  • How do I reload haproxy.cfg on the default Dockerfile?
  • Can Docker containers (NOT Docker images) be moved?
  • shadow
    Privacy Policy - Terms - Contact Us © ourworld-yourmove.org