Last active
March 26, 2019 21:11
-
-
Save adrianosela/61627cafe82c2f5e8aeb1beb01dca7b4 to your computer and use it in GitHub Desktop.
Remote React-Native Android Bundler API - Dockerfile
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Pull base image. | |
FROM ubuntu:14.04 | |
# Install linux tools | |
# Install nodejs, npm, openjdk | |
RUN \ | |
sed -i 's/# \(.*multiverse$\)/\1/g' /etc/apt/sources.list && \ | |
apt-get update && \ | |
apt-get -y upgrade && \ | |
apt-get install -y build-essential && \ | |
apt-get install -y software-properties-common && \ | |
apt-get install -y byobu curl git htop man unzip vim wget && \ | |
apt-get install -y nodejs npm openjdk-7-jdk && \ | |
rm -rf /var/lib/apt/lists/* | |
# Symlink nodejs binary to "node" | |
RUN ln -s /usr/bin/nodejs /usr/bin/node | |
# Disable checking dependency certs on fetch | |
RUN npm set strict-ssl false | |
# Update node version | |
RUN npm cache clean -f | |
RUN npm install -g n | |
RUN n stable | |
# Install react-native | |
RUN npm install -g react-native-cli | |
# Set up working directory | |
RUN mkdir QubicHub | |
COPY SRC QubicHub | |
WORKDIR /QubicHub | |
# Install/update react-native project deps | |
RUN npm install | |
# Move back to the root directory | |
WORKDIR / | |
# Pass build arguments | |
ARG in_prod | |
ENV PROD $in_prod | |
# Copy bundler API binary | |
ADD qubichub_bundler_linux /bin/qubichub_bundler_linux | |
# Expose default HTTPS and HTTP ports | |
EXPOSE 443 | |
EXPOSE 80 | |
# Run binary | |
CMD ["/bin/qubichub_bundler_linux"] | |
# TO DEBUG: Get a bash session in the container | |
# CMD ["/bin/bash"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment