Browse Source

pinned versions, fixed poetry, added helper scripts

acm-debugging-and-enhancements
Drew Short 9 months ago
parent
commit
1aa5bc8d80
  1. 22
      Dockerfile
  2. 9
      scripts/build_container.sh
  3. 11
      scripts/upload_pipeline.sh

22
Dockerfile

@ -13,12 +13,14 @@ ENV DEBIAN_FRONTEND=noninteractive
RUN ln -fs /usr/share/zoneinfo/UCT /etc/localtime \
&& apt-get update -y \
&& apt-get install -y --fix-missing \
build-essential=12.8ubuntu1 \
curl=7.68.0-1ubuntu2.7 \
ffmpeg=7:4.2.4-1ubuntu0.1 \
opus-tools=0.1.10-1 \
optipng=0.7.7-1 \
python3=3.8.2-0ubuntu2 \
python3-pip=20.0.2-5ubuntu1.5 \
python3-distutils=3.8.10-0ubuntu1~20.04 \
python3-apt=2.0.0ubuntu0.20.04.3 \
tzdata=2021e-0ubuntu0.20.04 \
webp=0.6.1-2ubuntu0.20.04.1
@ -26,18 +28,16 @@ WORKDIR /tmp
# Install mozjpeg
ARG MOZJPEG_VERSION="3.3.1"
RUN curl -LS -o mozjpeg.deb "https://nexus.nulloctet.com/repository/public/mozjpeg/mozjpeg_${MOZJPEG_VERSION}_amd64.deb" \
ARG MOZJPEG_ARCH="amd64"
RUN curl -LS -o mozjpeg.deb "https://nexus.nulloctet.com/repository/public/mozjpeg/mozjpeg_${MOZJPEG_VERSION}_${MOZJPEG_ARCH}.deb" \
&& dpkg -i mozjpeg.deb \
&& ln -sf /opt/mozjpeg/bin/cjpeg /bin/cjpeg \
&& rm -f mozjpeg.deb
# Install poetry
ARG POETRY_VERSION="1.1.12"
RUN curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/${POETRY_VERSION}/get-poetry.py | python -
# Cleanup image programs and cache
RUN apt-get remove -y curl \
&& rm -rf /var/lib/apt/lists/*
RUN curl -sSL "https://raw.githubusercontent.com/python-poetry/poetry/${POETRY_VERSION}/get-poetry.py" | python3 -
ENV PATH="${PATH}:/root/.poetry/bin"
WORKDIR /app
@ -45,7 +45,13 @@ WORKDIR /app
COPY . /app/
# Install application requirements
RUN python3 -m pip install -r requirements.txt
RUN poetry install
# Cleanup image programs and cache
RUN apt-get remove -y \
build-essential \
curl \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /bin

9
scripts/build_container.sh

@ -0,0 +1,9 @@
#!/usr/bin/env bash
TAG=${TAG:-dev}
if [[ -n "$1" ]]; then
TAG="$1"
fi
DOCKER_BUILDKIT=1
docker build --platform=amd64 -t sothr/acm:${TAG} .

11
scripts/upload_pipeline.sh

@ -0,0 +1,11 @@
#!/usr/bin/env bash
TEAM=docker
PIPELINE=acm
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
pushd "${DIR}"
fly -t ${TEAM} set-pipeline --pipeline ${PIPELINE} --config pipeline.yml
popd
Loading…
Cancel
Save