Skip to content

Commit

Permalink
#15 all env into .bashrc
Browse files Browse the repository at this point in the history
  • Loading branch information
yegor256 committed Sep 11, 2022
1 parent b49b148 commit a07d419
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,11 @@ RUN apt-get clean && \
dpkg-reconfigure locales && \
echo "LC_ALL=en_US.UTF-8\nLANG=en_US.UTF-8\nLANGUAGE=en_US.UTF-8" > /etc/default/locale
ENV LC_ALL en_US.UTF-8
RUN echo 'LC_ALL=en_US.UTF-8' >> /root/.bashrc
ENV LANG en_US.UTF-8
RUN echo 'LANG=en_US.UTF-8' >> /root/.bashrc
ENV LANGUAGE en_US.UTF-8
RUN echo 'LANGUAGE=en_US.UTF-8' >> /root/.bashrc

# Basic Linux tools
RUN apt-get update -y --fix-missing && apt-get install -y wget curl \
Expand Down Expand Up @@ -118,6 +121,7 @@ RUN update-java-alternatives --set java-1.11.0-openjdk-amd64
ENV MAVEN_OPTS "-Xmx1g"
ENV JAVA_OPTS "-Xmx1g"
ENV JAVA_HOME "/usr/lib/jvm/java-11-openjdk-amd64"
RUN echo 'JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64' >> /root/.bashrc
RUN java --version

# PhantomJS
Expand All @@ -135,6 +139,7 @@ RUN mkdir /tmp/texlive \
# https://stackoverflow.com/a/41864647/187141
# ENV PATH "${PATH}:$(realpath /usr/local/texlive/*/bin/*)"
ENV PATH "${PATH}:/usr/local/texlive/2022/bin/x86_64-linux"
RUN echo 'PATH=${PATH}:/usr/local/texlive/2022/bin/x86_64-linux' >> /root/.bashrc
RUN tlmgr init-usertree
RUN tlmgr install texliveonfly
RUN pdflatex --version
Expand All @@ -154,12 +159,14 @@ RUN /etc/init.d/postgresql start && \
EXPOSE 5432
USER root
ENV PATH="${PATH}:/usr/lib/postgresql/12/bin"
RUN echo 'PATH=${PATH}:/usr/lib/postgresql/12/bin' >> /root/.bashrc
RUN initdb --version
# Postgresql service has to be started using `sudo /etc/init.d/postgresql start` in .rultor.yml

# Maven
ENV MAVEN_VERSION 3.8.6
ENV M2_HOME "/usr/local/apache-maven/apache-maven-${MAVEN_VERSION}"
RUN echo 'M2_HOME=/usr/local/apache-maven/apache-maven-${MAVEN_VERSION}' >> /root/.bashrc
RUN wget --quiet "https://dlcdn.apache.org/maven/maven-3/${MAVEN_VERSION}/binaries/apache-maven-${MAVEN_VERSION}-bin.tar.gz" && \
mkdir -p /usr/local/apache-maven && \
mv "apache-maven-${MAVEN_VERSION}-bin.tar.gz" /usr/local/apache-maven && \
Expand Down Expand Up @@ -192,9 +199,11 @@ RUN npm --version
# Rust and Cargo
RUN curl https://sh.rustup.rs -sSf | bash -s -- -y
ENV PATH="${PATH}:${HOME}/.cargo/bin"
RUN echo 'PATH=${PATH}:${HOME}/.cargo/bin' >> /root/.bashrc
RUN ${HOME}/.cargo/bin/rustup toolchain install stable

# Clean up
RUN rm -rf /root/.ssh
RUN rm -rf /root/.gnupg

ENTRYPOINT ["/bin/bash", "--login", "-c"]

0 comments on commit a07d419

Please sign in to comment.