Tag: docker

trapping signal from “docker stop” in bash

i have an entry point script in a docker container that looks something like the following: #!/bin/bash echo starting up function shut_down() { echo shutting down pid=$(ps -e | grep myapp | awk ‘{print $1}’) kill -SIGTERM $pid exit } trap “shut_down” SIGKILL SIGTERM SIGHUP SIGINT EXIT /opt/myapp I can’t figure out how to trap […]

HyperV is not available on Home editions

Just got message “HyperV is not available on Home editions” when installing Docker 1.12 As checking about Hyper-V, I wonder is it possible to install separate HyperV on Windows 10 Home and latest Docker to be able to use it. As I understand “Docker for Windows” is now new recommended way to get started with […]

Zero Downtime app deployment with CoreOS

I have a docker container that I want to deploy to a CoreOS cluster that has to download my app from a git repo. Let’s say the app container runs nginx / nodejs How should I update it? If i submit the container and start it, that works the first time. But the second time […]

Conditional ENV in Dockerfile

Is it possible to conditionally set an ENV variable in a Dockerfile based on the value of a build ARG? Ex: something like ARG BUILDVAR=sad ENV SOMEVAR=if $BUILDVAR -eq “SO”; then echo “hello”; else echo “world”; fi Update: current usage based on Mario’s answer: ARG BUILD_ENV=prod ENV NODE_ENV=production RUN if [ “${BUILD_ENV}” = “test” ]; […]

Docker opens up a tiny new window that does nothing

This is related to a previous question- Under Ubuntu 12.04 when I run any docker command like: sudo docker pull ubuntu The focus is lost from my terminal and a tiny (barely noticeable) new window opens up. When I expand the window there is nothing in it (just blackness). When I close it I get […]

Rename docker machine

How can I rename a docker-machine machine? I can’t find it using docker-machine –help or in the subcommand docs.

How do i migrate mysql data directory in docker container?

I have a docker container running mysql-5.5 with host data volume. I am upgrading my container to mysql-5.6. I am starting a new container with same host volume. MySQL was crashing in the container due to the crash of mysql.user table. [ERROR] Fatal error: Can’t open and lock privilege tables: Incorrect key file for table […]

docker java7 install fail

I’m trying to install java7 via ppa (RUN add-apt-repository ppa:webupd8team/java -y) in my docker image but it fails with this error: returned a non-zero code: 127 The following are suggested ways to install correctly but it’s not working. I’ve tried both ppas as well. RUN apt-get install python-software-properties -y RUN add-apt-repository ppa:webupd8team/java -y #RUN add-apt-repository […]

How do I deploy updated Docker images to Amazon ECS tasks?

What is the right approach to make my Amazon ECS tasks update their Docker images, once said images have been updated in the corresponding registry?

docker-compose : Unsupported config option for services service: 'web'

I am going through getting started page for docker-compose: https://docs.docker.com/compose/gettingstarted/ In Step 3, I made a docker-compose.yml file as described: version: ‘2’ services: web: build: . ports: – “5000:5000” volumes: – .:/code depends_on: – redis redis: image: redis But when I run: $ docker-compose up I get following error: Unsupported config option for services service: […]

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