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 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60
| FROM amazonlinux:latest
ARG NODE_V="14.10.0" ARG RUBY_V="3.0.0"
RUN yum update -y && \ yum install -y wget which systemd-sysv crontabs && \ wget https://kojipkgs.fedoraproject.org//packages/sqlite/3.8.11/1.fc21/x86_64/sqlite-devel-3.8.11-1.fc21.x86_64.rpm && \ wget https://kojipkgs.fedoraproject.org//packages/sqlite/3.8.11/1.fc21/x86_64/sqlite-3.8.11-1.fc21.x86_64.rpm && \ yum install -y sqlite-3.8.11-1.fc21.x86_64.rpm sqlite-devel-3.8.11-1.fc21.x86_64.rpm && \ yum install -y git tar gcc gcc-c++ make openssl-devel zlib-devel sqlite sqlite-devel bzip2 readline-devel mysql-devel && \ yum --enablerepo=epel,remi,rpmforge install -y libxml2 libxml2-devel && \ yum install -y curl libcurl libcurl-devel && \
git clone https://github.com/nodenv/nodenv.git ~/.nodenv && \ echo 'export PATH="$HOME/.nodenv/bin:$PATH"' >> ~/.bash_profile && \ source ~/.bash_profile && \ echo 'eval "$(nodenv init -)"' >> ~/.bash_profile && \ source ~/.bash_profile && \ mkdir -p "$(nodenv root)"/plugins && \ git clone https://github.com/nodenv/node-build.git "$(nodenv root)"/plugins/node-build && \ nodenv install $NODE_V && \ nodenv global $NODE_V && \ npm install yarn && \
git clone https://github.com/rbenv/rbenv.git ~/.rbenv && \ echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bash_profile && \ source ~/.bash_profile && \ echo 'eval "$(rbenv init -)"' >> ~/.bash_profile && \ source ~/.bash_profile && \ mkdir -p "$(rbenv root)"/plugins && \ git clone https://github.com/rbenv/ruby-build.git "$(rbenv root)"/plugins/ruby-build && \ rbenv install $RUBY_V && \ rbenv global $RUBY_V && \
wget https://dl.yarnpkg.com/rpm/yarn.repo -O /etc/yum.repos.d/yarn.repo && \ curl --silent --location https://rpm.nodesource.com/setup_6.x | bash - && \ yum install yarn -y && \
amazon-linux-extras install nginx1 && \ systemctl enable nginx.service && \ cp -pr /etc/nginx /etc/nginx_defult
ENV PATH /root/.rbenv/shims:/root/.rbenv/bin:/root/.nodenv/shims:/root/.nodenv/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
RUN mkdir /usr/src/app WORKDIR /usr/src/app
ENTRYPOINT ["/usr/src/app/entrypoint.sh"]
EXPOSE 80 EXPOSE 443
|