From c9bc2e4a84736a3e5096e10f6a0a0a6943d851d0 Mon Sep 17 00:00:00 2001 From: Jesse Dearing Date: Tue, 30 Apr 2024 13:22:40 -0700 Subject: [PATCH] Add cloudsql --- Dockerfile | 5 +++-- zshrc | 21 --------------------- 2 files changed, 3 insertions(+), 23 deletions(-) diff --git a/Dockerfile b/Dockerfile index eca8f16..5e3e647 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,8 +7,9 @@ FROM docker.io/library/ubuntu:latest ENV KAFKA_VERSION=3.7.0 RUN ln -snf /usr/share/zoneinfo/US/Pacific /etc/localtime && \ apt update && \ - apt install -y zsh mariadb-client postgresql-client dnsutils netcat jq sshpass \ - neovim curl awscli gnupg openjdk-21-jre-headless tcpdump rclone sysstat sudo && \ + apt install -y zsh mariadb-client postgresql-client dnsutils netcat jq \ + neovim curl awscli gnupg openjdk-21-jre-headless tcpdump rclone sysstat \ + sudo sshpass cloudsql-proxy && \ curl -fsSL https://pkgs.k8s.io/core:/stable:/v1.29/deb/Release.key | sudo gpg --dearmor -o /etc/apt/keyrings/kubernetes-apt-keyring.gpg && \ echo 'deb [signed-by=/etc/apt/keyrings/kubernetes-apt-keyring.gpg] https://pkgs.k8s.io/core:/stable:/v1.29/deb/ /' | tee /etc/apt/sources.list.d/kubernetes.list && \ apt update && \ diff --git a/zshrc b/zshrc index 7c13302..b31e9a2 100644 --- a/zshrc +++ b/zshrc @@ -1,22 +1 @@ bindkey -v - -function mysql_setup() { - if [ -z "$MYSQL_USER" ]; then - return - fi - - if [ -z "$MYSQL_PASSWORD" ]; then - return - fi - - if [ -z "$MYSQL_HOST" ]; then - return - fi - - cat <<-EOF > $HOME/.my.cnf - [client] - host=$MYSQL_HOST - user=$MYSQL_USER - password=$MYSQL_PASSWORD - EOF -}