Last active
September 14, 2017 19:08
-
-
Save cdemers/be415cb46327e56c5c47f9689a07a456 to your computer and use it in GitHub Desktop.
Install the socat binary into a CoreOS installation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Insightful instructions, originally posted by Xynova (https://github.com/xynova) | |
# Make socat directories | |
mkdir -p /opt/bin/socat.d/bin /opt/bin/socat.d/lib | |
# Create socat wrapper | |
cat << EOF > /opt/bin/socat | |
#! /bin/bash | |
PATH=/usr/bin:/bin:/usr/sbin:/sbin:/opt/bin | |
LD_LIBRARY_PATH=/opt/bin/socat.d/lib:$LD_LIBRARY_PATH exec /opt/bin/socat.d/bin/socat "\$@" | |
EOF | |
chmod +x /opt/bin/socat | |
# Get socat and libraries from the CoreOS toolbox | |
toolbox | |
dnf install -y socat | |
cp -f /usr/bin/socat /media/root/opt/bin/socat.d/bin/socat | |
cp -f /usr/lib64/libssl.so.1.1.0f /media/root/opt/bin/socat.d/lib/libssl.so.1.1 | |
cp -f /usr/lib64/libcrypto.so.1.1.0f /media/root/opt/bin/socat.d/lib/libcrypto.so.1.1 | |
cp -f /usr/lib64/libreadline.so.7.0 /media/root/opt/bin/socat.d/lib/libreadline.so.7 | |
# Then tell the kubelet to consider binaries in the /opt/bin directory .. maybe changing it to a socat specific isolated one is better | |
# /etc/systemd/system/kubelet.service | |
# [Unit] | |
# Description=Kubernetes Kubelet Master | |
# Documentation=http://kubernetes.io/docs/admin/kubelet | |
# [Service] | |
# ExecStartPre=/usr/bin/mkdir -p /etc/kubernetes/manifests | |
# ExecStartPre=/usr/bin/mkdir -p /etc/cni/net.d | |
# ExecStartPre=/usr/bin/mkdir -p /opt/cni/bin | |
# Environment="PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/opt/bin" | |
# ... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@cdemers: I have a container install-socat to help with the installation. Thanks for the inspiration!