aboutsummaryrefslogtreecommitdiffstats
path: root/extra/docker/Dockerfile.test-base
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2020-12-11 11:34:24 -0800
committerBryan Newbold <bnewbold@robocracy.org>2022-01-26 18:02:06 -0800
commit3c5ad5306fc2260466fc619b5ef6a778b8cd3a68 (patch)
tree41c176353f67e5a551302ee08a19a595a097bfdb /extra/docker/Dockerfile.test-base
parentdb489fa78e80615e61b6857b8262bf5ab44fd10f (diff)
downloadfatcat-3c5ad5306fc2260466fc619b5ef6a778b8cd3a68.tar.gz
fatcat-3c5ad5306fc2260466fc619b5ef6a778b8cd3a68.zip
docker focal: update base image for focal/py38
Diffstat (limited to 'extra/docker/Dockerfile.test-base')
-rw-r--r--extra/docker/Dockerfile.test-base47
1 files changed, 11 insertions, 36 deletions
diff --git a/extra/docker/Dockerfile.test-base b/extra/docker/Dockerfile.test-base
index ff8c61e3..99e27728 100644
--- a/extra/docker/Dockerfile.test-base
+++ b/extra/docker/Dockerfile.test-base
@@ -1,53 +1,28 @@
-FROM ubuntu:xenial
+FROM ubuntu:focal
-ENV RUSTUP_HOME=/usr/local/rustup \
- CARGO_HOME=/usr/local/cargo \
+ENV CARGO_HOME=/usr/local/cargo \
PATH=/usr/local/cargo/bin:$PATH \
- RUST_VERSION=1.43.0 \
+ DEBIAN_FRONTEND="noninteractive" \
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 \
- software-properties-common wget curl pkg-config git \
- libpq-dev libsnappy-dev libsodium-dev \
- python3.7 python3.7-dev python3.7-venv python3.7-distutils \
+ software-properties-common wget pkg-config git \
+ rustc cargo \
+ libpq-dev libsnappy-dev libsodium-dev software-properties-common \
python3.8 python3.8-dev python3.8-venv python3.8-distutils \
- python3-dev python3-pip python3-wheel python3-requests python3-six python3-pytest
-
-# 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;
+ pipenv python3-dev python3-pip python3-wheel python3-requests python3-six python3-pytest; \
+ mkdir -p $CARGO_HOME; \
+ chmod -R a+w $CARGO_HOME; \
+ rustc --version; \
+ pipenv --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 using aggressive 'get-pipenv.py' script
-# this will clobber distro installation of, eg, 'pip'
-# original command: curl https://raw.githubusercontent.com/pypa/pipenv/master/get-pipenv.py | python3; \
-RUN set -eux; \
- curl -L https://archive.org/download/pipenv-mirror/get-pipenv.2020-12-22.py | python3; \
- pipenv --version