File tree Expand file tree Collapse file tree 2 files changed +54
-0
lines changed Expand file tree Collapse file tree 2 files changed +54
-0
lines changed Original file line number Diff line number Diff line change
1
+ FROM ruby:3.2.2-slim-bookworm
2
+
3
+ RUN apt update && \
4
+ apt --yes upgrade && \
5
+ apt --yes install build-essential curl procps git \
6
+ fonts-liberation libasound2 \
7
+ libatk-bridge2.0-0 libatk1.0-0 libc6 libcairo2 libcups2 libdbus-1-3 libexpat1 \
8
+ libfontconfig1 libgbm1 libgcc1 libgtk-3-0 libnspr4 libnss3 libpango-1.0-0 \
9
+ libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 libxcursor1 \
10
+ libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6 \
11
+ --no-install-recommends && \
12
+ rm -rf /var/lib/apt/lists/*
13
+
14
+ ARG UID=1000
15
+ ARG GID=1000
16
+
17
+ WORKDIR /srv/
18
+ COPY Gemfile /srv/Gemfile
19
+
20
+ RUN groupadd -g ${GID} docs && \
21
+ useradd -m -u ${UID} -g docs -s /bin/bash docs
22
+ RUN chown -R docs:docs /srv/
23
+ USER docs
24
+
25
+ RUN bash -l -c "echo 'export GEM_HOME=${HOME}/.gem' >> ${HOME}/.bashrc \
26
+ && echo 'export GEM_PATH=${HOME}/.gem' >> ${HOME}/.bashrc \
27
+ && source ~/.bashrc \
28
+ && bundle config set --local path ${HOME}/.gem \
29
+ && bundle install"
30
+
31
+ RUN bash -l -c "curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.5/install.sh | bash \
32
+ && export NVM_DIR=\"\$ ([ -z \" ${XDG_CONFIG_HOME-}\" ] && printf %s \" ${HOME}/.nvm\" || printf %s \" ${XDG_CONFIG_HOME}/nvm\" )\" \
33
+ && [ -s \"\$ NVM_DIR/nvm.sh\" ] && \\ . \"\$ NVM_DIR/nvm.sh\" \
34
+ && echo 'export PATH=${PATH}:/srv/node_modules/.bin' >> ${HOME}/.bashrc \
35
+ && source ~/.bashrc \
36
+ && nvm install node \
37
+ && npm install @mermaid-js/mermaid-cli"
38
+
39
+ ENV LANG C.UTF-8
40
+ ENV LC_ALL C.UTF-8
41
+ ENTRYPOINT ["bash" , "-l" ]
Original file line number Diff line number Diff line change @@ -32,5 +32,18 @@ id=$( podman run --cap-add NET_ADMIN --cap-add NET_RAW --detach -v $REPO:/srv/ -
32
32
podman attach $id
33
33
```
34
34
35
+ Or for Docker:
35
36
37
+ ```
38
+ REPO=~/repos/onboarding-to-bitcoin-core/
39
+
40
+ # docker build
41
+ docker build -f $REPO/Dockerfile -t guide $REPO
42
+ # or with docker buildx
43
+ docker build --load -f $REPO/Dockerfile -t guide $REPO
36
44
45
+ id=$( docker run --detach -v $REPO:/srv/ -p 8080:4000 -it guide:latest )
46
+ docker attach $id
47
+
48
+ bundle install # shouldn't be needed after Dockerfile build, but it is...
49
+ ```
You can’t perform that action at this time.
0 commit comments