Skip to content

Commit 6e85ae8

Browse files
committed
do not build slim image
1 parent 349f4e6 commit 6e85ae8

File tree

2 files changed

+2
-51
lines changed

2 files changed

+2
-51
lines changed

.github/workflows/build_images.yml

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,11 @@ jobs:
4040
username: ${{ secrets.DOCKER_USER }}
4141
password: ${{ secrets.DOCKER_PASS }}
4242

43-
- name: Build standard docker image
43+
- name: Build docker image
4444
uses: docker/build-push-action@v5
4545
with:
4646
context: .
4747
file: Dockerfile
48-
target: 'standard'
4948
build-args: 'PYTHON_VERSION=${{ matrix.version.python }}'
5049
push: ${{ github.ref_type == 'tag' }}
5150
tags: |
@@ -57,26 +56,6 @@ jobs:
5756
${{ env.IMAGE_NAME }}:latest-python${{ matrix.version.python }}
5857
cache-to: type=local,dest=/tmp/.buildx-cache-new
5958

60-
- name: Build slim docker image
61-
uses: docker/build-push-action@v5
62-
with:
63-
context: .
64-
file: Dockerfile
65-
target: 'slim'
66-
build-args: 'PYTHON_VERSION=${{ matrix.version.python }}'
67-
push: ${{ github.ref_type == 'tag' }}
68-
tags: |
69-
${{ env.IMAGE_NAME }}:latest-slim-python${{ matrix.version.python }}
70-
${{ matrix.version.latest && format('{0}:{1}{2}', env.IMAGE_NAME, github.ref_name, matrix.tag_suffix) || '' }}
71-
${{ env.IMAGE_NAME }}:${{ github.ref_name }}-slim-python${{ matrix.version.python }}
72-
${{ matrix.version.latest && format('{0}:latest-slim', env.IMAGE_NAME) || '' }}
73-
cache-from: |
74-
type=local,src=/tmp/.buildx-cache
75-
type=local,src=/tmp/.buildx-cache-new
76-
${{ env.IMAGE_NAME }}:latest-python${{ matrix.version.python }}
77-
${{ env.IMAGE_NAME }}:${{ github.ref_name }}-slim-python${{ matrix.version.python }}
78-
cache-to: type=local,dest=/tmp/.buildx-cache-new
79-
8059
# Temp fix
8160
# https://github.com/docker/build-push-action/issues/252
8261
# https://github.com/moby/buildkit/issues/1896

Dockerfile

Lines changed: 1 addition & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM continuumio/miniconda3 as standard
1+
FROM continuumio/miniconda3
22

33
LABEL maintainer="Anton Korosov <anton.korosov@nersc.no>"
44
LABEL purpose="Python libs for developing and running Nansat"
@@ -35,31 +35,3 @@ ENV GDAL_DATA=/opt/conda/share/gdal
3535
ENV PROJ_LIB=/opt/conda/share/proj
3636

3737
WORKDIR /src
38-
39-
40-
FROM standard as slim_builder
41-
42-
RUN pip install conda-pack \
43-
&& conda create --name to_pack --clone base \
44-
&& conda-pack -n to_pack -o /tmp/env.tar \
45-
&& mkdir /venv && tar -C /venv -xf /tmp/env.tar \
46-
&& /venv/bin/conda-unpack
47-
48-
FROM debian:buster as slim
49-
50-
COPY --from=slim_builder /usr/share/MOD44W /usr/share/MOD44W
51-
COPY --from=slim_builder /venv /venv
52-
COPY --from=slim_builder /usr/lib/x86_64-linux-gnu/libXau.so.6* /usr/lib/x86_64-linux-gnu
53-
RUN mkdir -p "/root/.local/share/pythesint"
54-
COPY --from=slim_builder "/root/.local/share/pythesint" "/root/.local/share/pythesint"
55-
56-
ENV VIRTUAL_ENV='/venv'
57-
ENV PATH="$VIRTUAL_ENV/bin:$PATH"
58-
ENV PYTHONUNBUFFERED=1
59-
ENV PYTHONPATH=/src
60-
ENV MOD44WPATH=/usr/share/MOD44W
61-
ENV GDAL_DRIVER_PATH=/venv/lib/gdalplugins
62-
ENV GDAL_DATA=/venv/share/gdal
63-
ENV PROJ_LIB=/venv/share/proj
64-
65-
WORKDIR /src

0 commit comments

Comments
 (0)