bnchdrff / dockerfiles

nginx and php5-fpm with a linked mysql container
14 stars 5 forks source link

explicitly issued environment variable as per - https://github.com/dockerfile/m... #7

Closed gl2748 closed 9 years ago

gl2748 commented 9 years ago

...ariadb/issues/3

This may be a result of the docker exec command (Docker.v.1.3 +) so is only recently apparent, but when you docker exec bash into the running mariadb container and subsequently attempt to access the database with the mysql command it throws an error TERM environment variable not set.

A fix is to run export TERM=dumb and then run mysql again.

Similarly, by explicitly setting environment variable in the dockerfile, the error message never appears, i.e. adding ENV TERM dumb

Note: I have only used the first method successfully but have added the solution to this Dockerfile based on the documentation of this issue here: https://github.com/dockerfile/mariadb/issues/3

bnchdrff commented 9 years ago

Handy. I usually just connect remotely so i never ran into this bug.