summaryrefslogtreecommitdiffstats
path: root/src/Dockerfile.centos
blob: 2024482b2bf12d62aef70019832e70d5aeb2c77e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
FROM centos:centos6
MAINTAINER Junegunn Choi <junegunn.c@gmail.com>

# yum
RUN yum install -y git gcc make tar glibc-devel glibc-devel.i686 \
    ncurses-devel ncurses-static ncurses-devel.i686 \
    gpm-devel gpm-static libgcc.i686

# Install Go 1.4
RUN cd / && curl \
    https://storage.googleapis.com/golang/go1.4.2.linux-amd64.tar.gz | \
    tar -xz && mv go go1.4

# Install Go 1.5
RUN cd / && curl \
    https://storage.googleapis.com/golang/go1.5.3.linux-amd64.tar.gz | \
    tar -xz && mv go go1.5

# Install RPMs for building static 32-bit binary
RUN curl ftp://ftp.pbone.net/mirror/ftp.centos.org/6.7/os/i386/Packages/ncurses-static-5.7-4.20090207.el6.i686.rpm -o rpm && rpm -i rpm && \
    curl ftp://ftp.pbone.net/mirror/ftp.centos.org/6.7/os/i386/Packages/gpm-static-1.20.6-12.el6.i686.rpm -o rpm && rpm -i rpm

ENV GOROOT_BOOTSTRAP /go1.4
ENV GOROOT /go1.5
ENV PATH /go1.5/bin:$PATH

# For i386 build
RUN cd $GOROOT/src && GOARCH=386 ./make.bash

# Default CMD
CMD cd /fzf/src && /bin/bash