Skip to content

Commit b143a89

Browse files
committed
update site development docker to newer Ruby
1 parent 20e9891 commit b143a89

3 files changed

Lines changed: 39 additions & 9 deletions

File tree

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ The site should now be running on localhost port 4000. Changes to files will sho
2020
To install the site locally with docker run the following commands:
2121

2222
1. Clone the repo `$ git clone git@github.com:griffithlab/rnabio.org.git`
23-
2. Pull the docker image `$ docker pull griffithlab/rnabiodev:0.0.4`
24-
3. Run the docker `$ docker run -p 4000:4000 -v ~/git/rnabio.org/:/opt/git/rnabio.org -it griffithlab/rnabiodev:0.0.4`
23+
2. Pull the docker image `$ docker pull griffithlab/rnabiodev:0.0.5`
24+
3. Run the docker `$ docker run -p 4000:4000 -v ~/git/rnabio.org/:/opt/git/rnabio.org -it griffithlab/rnabiodev:0.0.5`
2525

2626
Make sure that the above command has correct path to cloned git repo (The first part specified with -v option). The site should now be running on localhost port 4000. Changes to files will show up interactively on localhost:4000.
2727

docker/site/0.0.5/Dockerfile

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
################################################################################
2+
##################### Set Inital Image to work from ############################
3+
4+
FROM ruby:3.3.11
5+
6+
################################################################################
7+
##################### Add Container Labels #####################################
8+
9+
LABEL "Description"="ruby environment for development of rnabio.org site"
10+
11+
################################################################################
12+
##################### Install Necessary gems ############################
13+
14+
WORKDIR /tmp/rnabio.org
15+
RUN wget https://raw.githubusercontent.com/griffithlab/rnabio.org/master/Gemfile &&\
16+
wget https://raw.githubusercontent.com/griffithlab/rnabio.org/master/Gemfile.lock &&\
17+
wget https://raw.githubusercontent.com/griffithlab/rnabio.org/master/alembic-jekyll-theme.gemspec &&\
18+
gem install bundler &&\
19+
bundle install
20+
WORKDIR /usr/local/bin
21+
RUN echo "#!/bin/bash\nbundle exec jekyll serve --host 0.0.0.0 --watch" > start_jekyll.sh &&\
22+
chmod +x start_jekyll.sh &&\
23+
mkdir -p /opt/git/rnabio.org &&\
24+
rm -rf /tmp/rnabio.org
25+
WORKDIR /opt/git/rnabio.org
26+
27+
################################################################################
28+
##################### Set Entrypoint ############################
29+
ENTRYPOINT ["/usr/local/bin/start_jekyll.sh"]
30+

docker/site/README

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,17 @@
33

44
#1. Create a new Dockerfile
55
cd ~/git/rnabio.org/docker/site
6-
mkdir 0.0.2
7-
cd 0.0.2
8-
cp ~/git/rnabio.org/docker/site/0.0.1/Dockerfile .
6+
mkdir 0.0.5
7+
cd 0.0.5
8+
cp ~/git/rnabio.org/docker/site/0.0.4/Dockerfile .
99

1010
#2. Modify the new Dockerfile as needed
1111

1212
#3. Make sure docker is running
1313

1414
#4. Clean up docker environment
1515
#To ensure a clean/new build you may want to clean up (delete) old containers, images, volumes and cache
16-
#4.1 Deleted containers, images, and volumes directly in the docker desktop app
16+
#4.1 Delete containers, images, and volumes directly in the docker desktop app
1717
#4.2 Check for any remaining data in docker environment
1818
docker system df
1919

@@ -22,11 +22,11 @@ docker buildx prune
2222
docker system df
2323

2424
#Build a new image from modified Dockerfile
25-
docker build -t griffithlab/rnabiodev:0.0.2 ./
25+
docker build -t griffithlab/rnabiodev:0.0.5 ./
2626

2727
#Test that the image is working
28-
docker run -p 4000:4000 -v ~/git/rnabio.org/:/opt/git/rnabio.org -it griffithlab/rnabiodev:0.0.2
28+
docker run -p 4000:4000 -v ~/git/rnabio.org/:/opt/git/rnabio.org -it griffithlab/rnabiodev:0.0.5
2929

3030
#Once satistfied, push the image to dockerhub
31-
docker push griffithlab/rnabiodev:0.0.2
31+
docker push griffithlab/rnabiodev:0.0.5
3232

0 commit comments

Comments
 (0)