Skip to content

Commit aa5b2eb

Browse files
authored
Cleanup dockerfile a little bit (#2)
* Cleanup dockerfile a little bit * Repo files * Tweak
1 parent b700a42 commit aa5b2eb

File tree

5 files changed

+41
-10
lines changed

5 files changed

+41
-10
lines changed

.github/CODEOWNERS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
* @wjthieme
2+

.github/dependabot.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "docker"
4+
directory: "/"
5+
schedule:
6+
interval: "daily"
7+
labels: [ ]

.github/pull_request_template.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<!--
2+
**Title**
3+
A brief description of the pull request.
4+
5+
**Details**
6+
A clear and concise description of what this pull request solves.
7+
-->

.github/workflows/dependabot.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Dependabot
2+
3+
on:
4+
pull_request:
5+
types: [opened]
6+
7+
jobs:
8+
9+
automerge:
10+
runs-on: ubuntu-latest
11+
if: ${{ github.actor == 'dependabot[bot]' }}
12+
permissions:
13+
pull-requests: write
14+
contents: write
15+
steps:
16+
- name: Enable Automerge
17+
run: gh pr merge --auto --squash "$PR_URL"
18+
env:
19+
PR_URL: ${{ github.event.pull_request.html_url }}
20+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Dockerfile

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,25 +12,19 @@ ENV PATH="${HOME}/.local/share/solana/install/active_release/bin:${PATH}"
1212
ENV PATH="${HOME}/.nvm/versions/node/${NODE_VERSION}/bin:${PATH}"
1313

1414
# Install base utilities.
15-
RUN mkdir -p /workdir && mkdir -p /tmp && \
16-
apt-get update -qq && apt-get upgrade -qq && apt-get install -qq \
15+
RUN apt-get update -qq && apt-get upgrade -qq && apt-get install -qq \
1716
build-essential git curl wget jq pkg-config python3-pip \
1817
libssl-dev libudev-dev
1918

2019
# Install rust.
2120
RUN curl "https://sh.rustup.rs" -sfo rustup.sh && \
22-
sh rustup.sh --default-toolchain none -y && \
23-
rustup install ${RUSTC_VERSION#v} && \
24-
rustup default ${RUSTC_VERSION#v} && \
21+
sh rustup.sh --default-toolchain ${RUSTC_VERSION#v} -y && \
2522
rustup component add rustfmt clippy
2623

2724
# Install node / npm / yarn.
2825
RUN curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.40.1/install.sh | bash
2926
ENV NVM_DIR="${HOME}/.nvm"
3027
RUN . $NVM_DIR/nvm.sh && \
31-
nvm install ${NODE_VERSION} && \
32-
nvm use ${NODE_VERSION} && \
33-
nvm alias default node && \
3428
npm install -g yarn
3529

3630
# Install Solana tools.
@@ -40,10 +34,11 @@ RUN sh -c "$(curl -sSfL https://release.anza.xyz/${SOLANA_CLI}/install)"
4034
RUN cargo install --git https://github.com/coral-xyz/anchor --tag ${ANCHOR_CLI} anchor-cli --locked
4135

4236
# Build a dummy program to bootstrap the BPF SDK (doing this speeds up builds).
43-
RUN mkdir -p /tmp && cd /tmp && anchor init dummy && cd dummy && (anchor build || true)
44-
RUN rm -r /tmp/dummy
37+
RUN anchor init dummy && cd dummy && (anchor build || true)
38+
RUN rm -r dummy
4539

4640
# Set up the working directory
41+
RUN mkdir /workdir
4742
WORKDIR /workdir
4843

4944
# Copy the entrypoint script

0 commit comments

Comments
 (0)