Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save christophernhill/6b2fe04f3c6c0e6e62490057f7a82a18 to your computer and use it in GitHub Desktop.
Save christophernhill/6b2fe04f3c6c0e6e62490057f7a82a18 to your computer and use it in GitHub Desktop.
Code for pushing MITgcm testreport image to dockerhub
docker run --name centos_base-7.3.1611 -d -t centos:7.3.1611 /bin/bash
docker exec -t -i centos_base /bin/bash
# in container
yum -y install epel-release
yum -y install environment-modules
yum -y install which make m4 bc
yum -y install gcc gcc-gfortran
yum -y install mvapich2-2.2 mvapich2-2.2-devel
yum -y install mpich-3.2 mpich-3.2-devel
yum -y install mpich mpich-devel
yum -y install openmpi openmpi-devel
yum -y install netcdf-*
yum -y install git
yum -y install mlocate
yum -y install openssh openssh-server
yum -y update
mkdir ~/.ssh
chmod og-rwx ~/.ssh
ssh-keygen -q -t rsa1 -N "" -f /etc/ssh/ssh_host_rsa_key
ssh-keygen -q -t dsa -N "" -f /etc/ssh/ssh_host_dsa_key
ssh-keygen -q -t ecdsa -N "" -f /etc/ssh/ssh_host_ecdsa_key
ssh-keygen -q -t ed25519 -N "" -f /etc/ssh/ssh_host_ed25519_key
ssh-keygen -q -t dsa -N "" -f ~/.ssh/id_dsa
cp ~/.ssh/id_dsa.pub ~/.ssh/authorized_keys
echo "StrictHostKeyChecking no" >> /etc/ssh/ssh_config
# outside container
docker commit -m "Added latest CentOS-7.3.1611 with packages needed for MITgcm" -a "Chris Hill" centos_base-7.3.1611 mitgcm/testreport-images:centos-7.3.1611-20170809-v5
docker login # needs a docker account
docker push mitgcm/testreport-images:centos-7.3.1611-20170809-v5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment