aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2020-04-16 18:55:32 -0700
committerBryan Newbold <bnewbold@robocracy.org>2020-04-16 22:07:12 -0700
commitb1de347e9f4a4f482ab41813e835f0bfbedffe35 (patch)
tree1a53a8adee2edc788c0659e2e39e0f2fbdaa97e7
parentbcfdcf42b60af547e0ba3810f262306b3b6cecc7 (diff)
downloadfatcat-b1de347e9f4a4f482ab41813e835f0bfbedffe35.tar.gz
fatcat-b1de347e9f4a4f482ab41813e835f0bfbedffe35.zip
test-base Dockerfile
Used to create bnewbold/fatcat-test-base image
-rw-r--r--extra/docker/Dockerfile.test-base47
-rw-r--r--extra/docker/README.md4
2 files changed, 51 insertions, 0 deletions
diff --git a/extra/docker/Dockerfile.test-base b/extra/docker/Dockerfile.test-base
new file mode 100644
index 00000000..9cd26468
--- /dev/null
+++ b/extra/docker/Dockerfile.test-base
@@ -0,0 +1,47 @@
+
+FROM ubuntu:xenial
+
+ENV RUSTUP_HOME=/usr/local/rustup \
+ CARGO_HOME=/usr/local/cargo \
+ PATH=/usr/local/cargo/bin:$PATH \
+ RUST_VERSION=1.42.0 \
+ LC_ALL=C.UTF-8 \
+ LANG=C.UTF-8
+
+
+# Add deadsnakes repo
+RUN set -eux; \
+ apt update -qy; \
+ apt install -y software-properties-common; \
+ add-apt-repository -y ppa:deadsnakes/ppa;
+
+# APT dependencies
+RUN set -eux; \
+ apt update -qy; \
+ apt install -y python3-dev python3-pip python3-wheel python3-requests python3-six python3-pytest libsnappy-dev libsodium-dev software-properties-common python3.7 python3.7-dev python3.7-venv python3.7-distutils wget libpq-dev
+
+# Rust setup from docker-rust debian Dockerfile
+RUN set -eux; \
+ dpkgArch="$(dpkg --print-architecture)"; \
+ rustArch='x86_64-unknown-linux-gnu'; rustupSha256='ad1f8b5199b3b9e231472ed7aa08d2e5d1d539198a15c5b1e53c746aad81d27b' ; \
+ url="https://static.rust-lang.org/rustup/archive/1.21.1/${rustArch}/rustup-init"; \
+ wget "$url"; \
+ echo "${rustupSha256} *rustup-init" | sha256sum -c -; \
+ chmod +x rustup-init; \
+ ./rustup-init -y --no-modify-path --profile minimal --default-toolchain $RUST_VERSION; \
+ rm rustup-init; \
+ chmod -R a+w $RUSTUP_HOME $CARGO_HOME; \
+ rustup --version; \
+ cargo --version; \
+ rustc --version;
+
+# Compile and install diesel
+RUN set -eux; \
+ cargo install diesel_cli --version 1.3.1 --no-default-features --features postgres; \
+ diesel --version
+
+# Install pipenv
+RUN set -eux; \
+ pip3 install pipenv; \
+ pipenv --version
+
diff --git a/extra/docker/README.md b/extra/docker/README.md
index 4fd78e56..1869b354 100644
--- a/extra/docker/README.md
+++ b/extra/docker/README.md
@@ -17,3 +17,7 @@ TODO:
- postgres
- fatcatd (rust)
- kibana
+
+## Test Base Image
+
+ docker build -t bnewbold/fatcat-test-base -f Dockerfile.test-base .