Skip to content

Instantly share code, notes, and snippets.

@dbehnke
dbehnke / Dockerfile
Last active November 10, 2016 16:32
Go Compiling from Centos6 - useful for if you have cgo and need to compile things from oldest Linux possible
FROM centos:6
RUN yum -y update && \
yum -y install curl gcc gcc-c++ libaio-devel git && \
yum clean all && \
rm -r -f /var/cache/yum/*
COPY getgo.sh /opt/
RUN cd /opt && chmod +x ./getgo.sh && ./getgo.sh && mkdir /usr/local/go
RUN groupadd -g 1000 somebody && useradd -m -u 1000 -g 1000 somebody && chown -R somebody:somebody /usr/local/go
ENV GOROOT=/opt/go
ENV GOPATH=/usr/local/go
@dbehnke
dbehnke / getnodejs.sh
Created April 4, 2017 18:05
Get the latest nodejs/npm binaries and extract and create activate script (Linux 64bit)
#!/bin/bash
getversion() {
curl https://nodejs.org/en/ -o index.html
export version=$(cat index.html | grep Current | tail -n 1 | awk -F' v' '{ print $2 }' | awk -F' Current' '{ print $1 }')
}
cleandownload() {
rm index.html
rm node.tar.xz