Skip to content

Commit

Permalink
chore(Dockerfiles): Rename stable to nix
Browse files Browse the repository at this point in the history
Move current nix to nightly.
  • Loading branch information
brianp committed Mar 17, 2020
1 parent 2ff970e commit f46a3ec
Show file tree
Hide file tree
Showing 3 changed files with 73 additions and 73 deletions.
35 changes: 35 additions & 0 deletions nix-nightly.dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
FROM rustlang/rust:nightly

ENV TMUX_VERSION 3.1
WORKDIR /usr/src

# This is a dummy build to get the dependencies cached
COPY . .
RUN cargo fetch --target x86_64-unknown-linux-gnu
RUN rm -rf ./*

RUN apt-get update && \
apt-get install -y libevent-dev \
locales \
bison \
byacc && \
apt-get remove tmux

RUN git clone https://github.com/tmux/tmux.git /opt/tmux && \
cd /opt/tmux && \
git checkout $TMUX_VERSION && \
sh autogen.sh && \
./configure --prefix=/opt/tmux && make && make install

ENV PATH $PATH:/opt/tmux/bin

RUN sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen && \
locale-gen

ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
ENV LC_ALL en_US.UTF-8

RUN rustup component add rustfmt
RUN rustup component add clippy --toolchain=nightly || cargo install --git https://github.com/rust-lang/rust-clippy/ --force clippy
RUN cargo install clog-cli
51 changes: 0 additions & 51 deletions nix-stable.dockerfile

This file was deleted.

60 changes: 38 additions & 22 deletions nix.dockerfile
Original file line number Diff line number Diff line change
@@ -1,35 +1,51 @@
FROM rustlang/rust:nightly
FROM rust:latest

ENV TMUX_VERSION 3.0a
ENV TMUX_VERSION 3.1
WORKDIR /usr/src

# This is a dummy build to get the dependencies cached
COPY . .
RUN cargo fetch --target x86_64-unknown-linux-gnu
RUN rm -rf ./*

RUN apt-get update && \
apt-get install -y libevent-dev \
locales \
bison \
byacc && \
apt-get remove tmux

RUN git clone https://github.com/tmux/tmux.git /opt/tmux && \
RUN cargo fetch --target x86_64-unknown-linux-gnu; \
cargo build; \
rm -rf ./*

RUN apt-get update; \
apt-get install -y --no-install-recommends \
automake \
bison \
byacc \
git \
libevent-dev \
libncurses-dev \
locales \
pkg-config; \
apt-get remove tmux

RUN git clone --depth=1 --branch $TMUX_VERSION https://github.com/tmux/tmux.git /opt/tmux && \
cd /opt/tmux && \
git checkout $TMUX_VERSION && \
sh autogen.sh && \
./configure --prefix=/opt/tmux && make && make install

ENV PATH $PATH:/opt/tmux/bin

RUN sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen && \
locale-gen

ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
ENV LC_ALL en_US.UTF-8

RUN rustup component add rustfmt
RUN rustup component add clippy --toolchain=nightly || cargo install --git https://github.com/rust-lang/rust-clippy/ --force clippy
RUN cargo install clog-cli
ENV PATH=$PATH:/opt/tmux/bin \
LANG=en_US.UTF-8 \
LANGUAGE=en_US:en \
LC_ALL=en_US.UTF-8

RUN apt-get remove \
automake \
bison \
byacc \
git \
libevent-dev \
libncurses-dev \
locales \
pkg-config; \
rm -rf /var/lib/apt/lists/*;

RUN rustup component add rustfmt; \
cargo install clog-cli
# RUN rustup component add clippy --toolchain=nightly || cargo install --git https://github.com/rust-lang/rust-clippy/ --force clippy

0 comments on commit f46a3ec

Please # to comment.