Skip to content

Commit

Permalink
Fix DockerFile commands for vpc facing arch with updates to versions
Browse files Browse the repository at this point in the history
  • Loading branch information
noah-paige committed Dec 11, 2023
1 parent 94c93d9 commit 0d6a01a
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 13 deletions.
17 changes: 12 additions & 5 deletions documentation/userguide/docker/prod/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,30 @@ FROM public.ecr.aws/amazonlinux/amazonlinux:2023

ARG NODE_VERSION=18
ARG PYTHON_VERSION=3.9
ARG NGINX_VERSION=1.12
ARG NGINX_VERSION=1.24.0
ARG ENVSUBST_VERSION=v1.1.0

# Clean cache
RUN dnf upgrade -y;\
find /var/tmp -name "*.rpm" -print -delete ;\
find /tmp -name "*.rpm" -print -delete ;\
dnf autoremove -y; \
dnf clean all; rm -rfv /var/cache/dnf

# Installing libraries
RUN dnf -y install shadow-utils wget
RUN dnf -y install openssl-devel bzip2-devel libffi-devel postgresql-devel gcc unzip tar gzip
RUN dnf install python$PYTHON_VERSION
RUN dnf install nginx$NGINX_VERSION
RUN dnf -y install nginx-$NGINX_VERSION
RUN dnf -y install python$PYTHON_VERSION
RUN dnf -y install python$PYTHON_VERSION-pip

RUN touch ~/.bashrc

COPY . ./

RUN python$PYTHON_VERSION -m pip install -U pip
RUN python$PYTHON_VERSION -m pip install -r requirements.txt
RUN python$PYTHON_VERSION -m mkdocs build


RUN curl -L https://github.com/a8m/envsubst/releases/download/$ENVSUBST_VERSION/envsubst-`uname -s`-`uname -m` -o envsubst && \
chmod +x envsubst && \
mv envsubst /usr/local/bin
Expand Down
21 changes: 13 additions & 8 deletions frontend/docker/prod/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,25 @@ FROM public.ecr.aws/amazonlinux/amazonlinux:2023

ARG REACT_APP_STAGE
ARG DOMAIN
ARG NODE_VERSION=18
ARG NGINX_VERSION=1.12
ARG NVM_VERSION=v0.37.0
ARG NODE_VERSION=18.19.0
ARG NGINX_VERSION=1.24.0
ARG NVM_VERSION=v0.37.2

RUN dnf update -y && \
dnf install -y tar gzip openssl && \
dnf clean all -y
RUN dnf install nginx$NGINX_VERSION
# Clean cache
RUN dnf upgrade -y;\
find /var/tmp -name "*.rpm" -print -delete ;\
find /tmp -name "*.rpm" -print -delete ;\
dnf autoremove -y; \
dnf clean all; rm -rfv /var/cache/dnf

# Installing libraries
RUN dnf install -y tar gzip openssl nginx-$NGINX_VERSION

RUN touch ~/.bashrc

RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/$NVM_VERSION/install.sh | bash
RUN . ~/.nvm/nvm.sh && nvm install node
RUN echo '. ~/.nvm/nvm.sh' >> ~/.bashrc
RUN echo '. ~/.nvm/nvm.sh' >> ~/.bashrc

RUN . ~/.nvm/nvm.sh && npm install -g npm@9 yarn

Expand Down

0 comments on commit 0d6a01a

Please sign in to comment.