Skip to content
This repository was archived by the owner on Aug 6, 2025. It is now read-only.

Commit 8014bbb

Browse files
authored
Merge pull request #60 from skerschb/DOCSP-8124
Docsp 8124
2 parents 58cf714 + 8e3ad7a commit 8014bbb

File tree

2 files changed

+11
-9
lines changed

2 files changed

+11
-9
lines changed

Dockerfile

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,17 @@ RUN apt-get install --yes build-essential
2727
RUN useradd -ms /bin/bash docsworker
2828
RUN npm -g config set user root
2929
USER docsworker
30+
3031
WORKDIR /home/docsworker
3132

3233
# install snooty parser
3334
RUN python3 -m pip uninstall -y snooty
3435
RUN python3 -m pip install --upgrade pip flit
35-
RUN git clone https://github.com/mongodb/snooty-parser.git snooty-parser && \
36+
RUN git clone https://github.com/mongodb/snooty-parser.git && \
3637
cd snooty-parser && \
37-
git fetch --all && \
38-
git reset --hard origin/master && \
38+
git fetch --tags && \
39+
latestTag=$(git describe --tags `git rev-list --tags --max-count=1`) && \
40+
git checkout "$latestTag" && \
3941
FLIT_ROOT_INSTALL=1 python3 -m flit install
4042
ENV PATH="${PATH}:/home/docsworker/.local/bin"
4143

@@ -55,9 +57,8 @@ COPY worker/ .
5557
RUN npm install
5658

5759
# where repo work will happen
58-
#RUN mv repos repos_tmp
59-
RUN mkdir repos && chmod 777 repos
60+
RUN mkdir repos && chmod 755 repos
6061

6162
# entry to kick-off the worker
6263
EXPOSE 3000
63-
CMD ["npm", "start"]
64+
CMD ["npm", "start"]

Dockerfile.xlarge

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,11 @@ WORKDIR /home/docsworker-xlarge
3333
# install snooty parser
3434
RUN python3 -m pip uninstall -y snooty
3535
RUN python3 -m pip install --upgrade pip flit
36-
RUN git clone https://github.com/mongodb/snooty-parser.git snooty-parser && \
36+
RUN git clone https://github.com/mongodb/snooty-parser.git && \
3737
cd snooty-parser && \
38-
git fetch --all && \
39-
git reset --hard origin/master && \
38+
git fetch --tags && \
39+
latestTag=$(git describe --tags `git rev-list --tags --max-count=1`) && \
40+
git checkout "$latestTag" && \
4041
FLIT_ROOT_INSTALL=1 python3 -m flit install
4142
ENV PATH="${PATH}:/home/docsworker-xlarge/.local/bin"
4243

0 commit comments

Comments
 (0)