Skip to content

Dockerfile updates based on Hotwire Codex requirements #43

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ end

# AppDev Gems
# ===========
gem "foreman"
gem "appdev_support"
gem "awesome_print"
gem "devise"
Expand Down
2 changes: 2 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ GEM
ffi-compiler (1.3.2)
ffi (>= 1.15.5)
rake
foreman (0.88.1)
globalid (1.2.1)
activesupport (>= 6.1)
grade_runner (0.0.9)
Expand Down Expand Up @@ -427,6 +428,7 @@ DEPENDENCIES
draft_generators
draft_matchers
faker
foreman
grade_runner
htmlbeautifier
http
Expand Down
13 changes: 9 additions & 4 deletions appdev.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ RUN /bin/bash -l -c "bundle install"

# Install Google Chrome
RUN sudo apt-get update && sudo apt-get install -y libxss1 && sudo rm -rf /var/lib/atp/lists/*
RUN wget https://dl.google.com/linux/chrome/deb/pool/main/g/google-chrome-stable/google-chrome-stable_114.0.5735.198-1_amd64.deb && \
RUN wget https://mirror.cs.uchicago.edu/google-chrome/pool/main/g/google-chrome-stable/google-chrome-stable_114.0.5735.198-1_amd64.deb && \
sudo apt-get install -y ./google-chrome-stable_114.0.5735.198-1_amd64.deb

# Install Chromedriver (compatable with Google Chrome version)
Expand All @@ -98,11 +98,15 @@ RUN BROWSER_MAJOR=$(google-chrome --version | sed 's/Google Chrome \([0-9]*\).*/
if [ $BROWSER_MAJOR != $DRIVER_MAJOR ]; then echo "VERSION MISMATCH"; exit 1; fi


# Install PostgreSQL
RUN sudo install-packages postgresql-12 postgresql-contrib-12
# Install PostgreSQL v14
# https://ethanmick.com/how-to-install-and-setup-postgresql-14-on-ubuntu-20-04/
RUN sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list' \
&& wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add - \
&& sudo apt-get update \
&& sudo apt-get -y install postgresql-14

# Setup PostgreSQL server for user student
ENV PATH="$PATH:/usr/lib/postgresql/12/bin"
ENV PATH="$PATH:/usr/lib/postgresql/14/bin"
ENV PGDATA="/workspaces/.pgsql/data"
RUN sudo mkdir -p $PGDATA
RUN mkdir -p $PGDATA ~/.pg_ctl/bin ~/.pg_ctl/sockets \
Expand Down Expand Up @@ -145,6 +149,7 @@ RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add - \
&& sudo npm install -g n \
&& sudo n 18 \
&& hash -r \
&& sudo chmod 777 /home/student/.cache \
&& sudo rm -rf /var/lib/apt/lists/*

# Install Redis.
Expand Down