Skip to content
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

Update Dockerfile #8

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
18 changes: 7 additions & 11 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,22 @@ ARG USERS_CFG=users.json
RUN apt-get update
RUN apt-get install -y curl vim sudo wget rsync
RUN apt-get install -y apache2
RUN apt-get install -y python
RUN apt-get install -y python2
RUN apt-get install -y supervisor
RUN apt-get clean
RUN rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

# Fetch brat
RUN mkdir /var/www/brat
RUN curl http://weaver.nlplab.org/~brat/releases/brat-v1.3_Crunchy_Frog.tar.gz > /var/www/brat/brat-v1.3_Crunchy_Frog.tar.gz
RUN cd /var/www/brat && tar -xvzf brat-v1.3_Crunchy_Frog.tar.gz
RUN curl https://codeload.github.com/nlplab/brat/tar.gz/refs/tags/v1.3p1 > /var/www/brat/brat-1.3p1.tar.gz
RUN cd /var/www/brat && tar -xvzf brat-1.3p1.tar.gz

# create a symlink so users can mount their data volume at /bratdata rather than the full path
RUN mkdir /bratdata && mkdir /bratcfg
RUN chown -R www-data:www-data /bratdata /bratcfg
RUN chmod o-rwx /bratdata /bratcfg
RUN ln -s /bratdata /var/www/brat/brat-v1.3_Crunchy_Frog/data
RUN ln -s /bratcfg /var/www/brat/brat-v1.3_Crunchy_Frog/cfg
RUN ln -s /bratdata /var/www/brat/brat-1.3p1/data
RUN ln -s /bratcfg /var/www/brat/brat-1.3p1/cfg

# And make that location a volume
VOLUME /bratdata
Expand All @@ -34,12 +34,12 @@ ADD brat_install_wrapper.sh /usr/bin/brat_install_wrapper.sh
RUN chmod +x /usr/bin/brat_install_wrapper.sh

# Make sure apache can access it
RUN chown -R www-data:www-data /var/www/brat/brat-v1.3_Crunchy_Frog/
RUN chown -R www-data:www-data /var/www/brat/brat-1.3p1/

ADD 000-default.conf /etc/apache2/sites-available/000-default.conf

# add the user patching script
ADD user_patch.py /var/www/brat/brat-v1.3_Crunchy_Frog/user_patch.py
ADD user_patch.py /var/www/brat/brat-1.3p1/user_patch.py

# Enable cgi
RUN a2enmod cgi
Expand All @@ -54,7 +54,3 @@ ADD supervisord.conf /etc/supervisor/conf.d/supervisord.conf

CMD ["/usr/bin/supervisord"]