Currently Browsing: Misc Tech

Docker pass term env to container with exec

Sometimes you need quick interactive access to a container that doesn’t have the TERM environment set, so you can pass it via something like this:

docker exec -ti mysql env TERM=xterm mysql -u mysqluser

Alpine Linux with Docker – node build tool updates

Smaller distros like Alpine for containers just seems to make sense.

Some build tools for node.js include:

apk --update add bash nano wget python make gcc g++

You can install on a “build” container and create an artifact to transfer to a sparse box without the build tools. See base images like:
mhart/alpine-node.

Solved: Adobe Lightroom CC 2015 update problem

After realizing my Adobe Lightroom CC 2015 at home hadn’t been auto-updating (and needed the latest update to be compatible with recent Sony raw format), nothing seemed to fix it — neither trying manual download nor updating permissions or other common online advice. (It was updating fine on another machine.)

The solution turned out to be: delete the file: /Library/Application Support/Adobe/AAMUpdaterInventory/1.0/AdobeUpdaterAdminPrefs.dat

Symptoms were: the “update” option under the help menu was disabled and the Creative Cloud showed the apps as current. The steps I did to fix it were

  • delete the “AdobeUpdaterAdminPrefs.dat” prefs file (see above)
  • log out of your Mac account (just to be safe)
  • log back in and both the Creative Cloud app as well as the in-app help menu should now offer the update option

    If this doesn’t work for you, it may be something else (like the oft-cited permission issues or conflicts with earlier versions of the app).

  • Docker network info, linked containers

    To see network info for Docker host, use the network (v1.9+) command:

    docker network [OPTIONS] COMMAND [OPTIONS]

    To link containers by name, you now need to use the –link command:

    The docker network inspect command above shows all the connected containers and their network resources on a given network. Containers in this default network are able to communicate with each other using IP addresses. Docker does not support automatic service discovery on the default bridge network. If you want to communicate with container names in this default bridge network, you must connect the containers via the legacy docker run --link option.

    If you upgraded your Docker host from pre 1.9 and your containers were not longer able to communicate, this is probably why.

    $ docker run --rm -ti busybox ping my-container
    ping: bad address 'my-container'
    $ docker run --rm -ti --link=my-container busybox ping my-container
    PING my-container (172.17.0.2): 56 data bytes
    ...

    See https://docs.docker.com/engine/userguide/networking/dockernetworks/

    And note:

    While links are still supported in this limited capacity, you should avoid them in preference of Docker networks. The link feature is expected to be deprecated and removed in a future release.

    So also see: https://docs.docker.com/engine/userguide/networking/default_network/build-bridges/ etc.

    Basic Docker usage stats

    Display a live stream of container(s) resource usage statistics:

    docker stats [OPTIONS] CONTAINER [CONTAINER...]

    To see all running containers:

    docker stats $(docker ps -q)

    « Previous Entries Next Entries »