Jens Segers has created a handy shell script to easily start/stop Docker Compose based projects:
Captain searches for docker-compose projects in your $HOME folder and allows you to start and stop those projects by passing a part of the parent directory name.
Let this small recording of Captain in action convince you:
Related: Recently bumped into this basic instructional video to get WordPress up and running using a Docker setup containing a Caddy, Apache2/PHP7 and a MySQL container. Good one if you’re looking to get started with Docker.
On a recent project I was working on, I wasn’t able to start the Android Emulator/Simulator anymore from within Android Studio. Every time I launched it from Android Studio it would start, but then – without any errors or warnings – close all by itself.
$ cd $(dirname $(which emulator)) && ./emulator -avd Nexus_5X_API_25
emulator: WARNING: encryption is off
Hax is enabled
Hax ram_size 0x60000000
HAX is working and emulator runs in fast virt mode.
Failed to sync vcpu reg
Failed to sync vcpu reg
Failed to sync vcpu reg
Failed to sync vcpu reg
Failed to sync vcpu reg
Failed to sync HAX vcpu contextInternal error: Initial hax sync failed
Aha, a clue! One Google Search Coupon later it turns out the thing preventing the emulator from running was that other thing using vcpu’s, namely docker.
👉 Killing docker will let you run the Android Emulator without any problems.
I haven’t tested other suggested solutions (such as tweaking the settings of the virtual device), but at least this one did it for me.
Did this help you out? Like what you see? Consider donating.
I don’t run ads on my blog nor do I do this for profit. A donation however would always put a smile on my face though. Thanks!
At work we’ve been using several separate docker images – such as instructure/fake-s3 and airdock/fake-sqs, orchestrated by docker-compose – to run a few of the Amazon Web Services locally.
LocalStack provides the whole lot in one:
LocalStack provides an easy-to-use test/mocking framework for developing Cloud applications. Currently, the focus is primarily on supporting the AWS cloud stack. LocalStack spins up the following core Cloud APIs on your local machine:
Today, at work, a colleague of mine ran into some time issues with his Docker containers: the time was clearly off. Turns out it’s a common problem:
Docker’s daemon fails to update the VM’s time after computer wakes up from sleep. The result is that VM’s clock will be set to a past time. This inturn will make Docker containers use that time.
Enter docker-time-sync-agent:
docker-time-sync-agent is a tool to prevent time drift in Docker for Mac’s HyperKit VM. It listens to system wakeup event and runs a shell script (update-docker-time) that updates the VM’s time. Time sync can be triggered manually anytime by running update-docker-time.