Skip to content

Instantly share code, notes, and snippets.

@yuu-ito
Created August 10, 2016 04:55
Show Gist options
  • Save yuu-ito/fc3baf510a4c25f24cad71643e5a1bd4 to your computer and use it in GitHub Desktop.
Save yuu-ito/fc3baf510a4c25f24cad71643e5a1bd4 to your computer and use it in GitHub Desktop.
[WIP]golangの開発環境Dockerfile
from centos:6
RUN yum install -y vim git wget tar
# useradd
RUN useradd -m y-ito \
&& echo "y-ito ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers \
&& echo 'y-ito:y-ito' | chpasswd
# Golang (1.6.3)
USER root
RUN wget https://storage.googleapis.com/golang/go1.6.3.linux-amd64.tar.gz
RUN tar -C /usr/local -xzf go1.6.3.linux-amd64.tar.gz
RUN rm -f go1.6.3.linux-amd64.tar.gz
USER y-ito
WORKDIR /home/y-ito
RUN echo 'export GOROOT="/usr/local/go"' >> ~/.bashrc
RUN echo 'export PATH="$GOROOT/bin:$PATH"' >> ~/.bashrc
ADD github_rsa /home/y-ito/.ssh/id_rsa
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment