init commit
This commit is contained in:
34
Dockerfile
Normal file
34
Dockerfile
Normal file
@@ -0,0 +1,34 @@
|
||||
FROM reactnativecommunity/react-native-android
|
||||
|
||||
|
||||
# config and update
|
||||
ENV DEBIAN_FRONTEND noninteractive
|
||||
WORKDIR /home
|
||||
RUN apt-get update
|
||||
RUN mkdir /var/log/app
|
||||
ARG SSH_KEY
|
||||
|
||||
# set up NVM and use v16 LTS
|
||||
RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash
|
||||
ENV NVM_DIR /root/.nvm
|
||||
ENV NODE_VERSION 16.20.1
|
||||
RUN . "$NVM_DIR/nvm.sh" && nvm install $NODE_VERSION && nvm alias default $NODE_VERSION && nvm use default
|
||||
ENV NODE_PATH $NVM_DIR/versions/node/v$NODE_VERSION/lib/node_modules
|
||||
ENV PATH $NVM_DIR/versions/node/v$NODE_VERSION/bin:$PATH
|
||||
RUN npm install -g react-native-cli
|
||||
|
||||
# Install SSH server
|
||||
RUN apt-get -y install openssh-server
|
||||
COPY sshd_config /etc/ssh/sshd_config
|
||||
RUN mkdir /root/.ssh
|
||||
RUN touch /root/.ssh/authorized_keys
|
||||
RUN chmod 600 /root/.ssh/authorized_keys
|
||||
RUN mkdir -p /run/sshd
|
||||
|
||||
# set up on-launch commands
|
||||
RUN apt-get install -y supervisor
|
||||
COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf
|
||||
COPY entrypoint.sh /entrypoint.sh
|
||||
RUN chmod +x /entrypoint.sh
|
||||
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
Reference in New Issue
Block a user