Tag: dockerfile

Best practices for Publishing an ASP.NET 5 app to Docker on Linux with Visual Studio

I follow the example to publish an ASP.NET app to Docker on Linux with Visual Studio. However each time I modify the code and publish it again. It seems to create a new container and image. So it is sort of wasting space. So what is the best practices here? How can I use the […]

How can one influence the order of RUN commands in a Dockerfile?

I’m writing a Dockerfile where the root user creates a user named blog to manage website deployment. I’m using the Docker Hub wordpress container as a base. The root user creates folders under /var/www/html and gives the blog user permissions to write underneath. In the next set of RUN commands following USER blog, these commands […]

postgres table does not exist from using docker-compose

I coded a simple server that uses postgres as DB. It was working when It’s not using docker but when it’s dockerized and orchestrated using docker compose, I couldn’t insert data in because table doesn’t not exist. I did check the DB in the container and it was there. The following are my setup and […]

How to combine a Nginx and a NodeJS Docker container

I’ve a nodejs container which hosts my backend and I have a nginx container which is hosting my Angular. They are both working fine. I’m able to visit my nodeJS container and I’m able to visit my Nginx-container. The problem is there seems to be no connection between the containers. The nginx container is only […]

Can i create log file during/after building a container

Normally it is possible to create log file of running container but i want create a log file of a build container is it possible.If yes, then how to create log file?

Docker running out of memory when loading large sql dump

I am trying to load a large sql dump to a docker postgres container and it is running out of memory. I have set log driver to none and still running out of memory the file is 3gb large docker run -it –volume=/backend/dumps:/dumps –log-driver=none –link=postgis:postgres –rm postgres sh -c ‘exec cat /dumps/databases/PostgreSQL.sql | psql -h […]

copying files using cp in dockfile fails

I want to copy one file from one directory to another in an ubuntu image in a dockfile. I tried RUN cp make/A.mk ./B.mk RUN make -j4 But it failed. Anyone can help me fix the problem? Thanks

creating a docker image of an app inside a running container

I have a Ruby on Rails app inside a docker container. I am unable to create a docker image. When I run docker build, I get: bash: docker: command not found I installed docker inside the docker container, then, still I get the same error. Kindly help.

Jekyll gem install error: unable to convert “\xC3” to UTF-8 in conversion from ASCII-8BIT to UTF-8 to US-ASCII for History.md

I’ve created a Dockerfile to install jekyll-2.5.3.gem. Docker Code: FROM base-ubuntu COPY jekyll-2.5.3.gem /tmp/jekyll-2.5.3.gem RUN apt-get update && \ apt-get install -y ruby-dev build-essential nodejs python && \ gem install /tmp/jekyll-2.5.3.gem EXPOSE 4000 WORKDIR /var/jekyll ENTRYPOINT [“jekyll”] I need to build a docker image with a container consisting of jekyll installation. Docker build command :- […]

Docker CMD to start Haproxy in Dockerfile

Here is my CMD command in my Dockerfile for haproxy: CMD [“/etc/init.d/haproxy”] Now when I run the image the following happens: … Successfully built 2eb6549e0a22 root@server:/# docker run -d -p 80:80 -p 81:81 -p 443:443 -p 1988:1988 –name haproxy -h haproxy user/haproxy 09b510c4df712414d8855d3e0fb27b7e35d5c5c2f0f9b07f7f29c8efdb93e852 root@server:/# docker ps -a CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES […]

Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.