Skip to content

Commit

Permalink
Merge pull request #519 from VisionSystemsInc/aen_pip
Browse files Browse the repository at this point in the history
Fix dockerfile compatibility warnings
  • Loading branch information
andyneff authored Dec 10, 2024
2 parents c5ed795 + 0b763f2 commit a109f58
Show file tree
Hide file tree
Showing 10 changed files with 50 additions and 50 deletions.
14 changes: 7 additions & 7 deletions docker/tests/bash_test.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
ARG BASH_VERSION=5.0
ARG DOCKER_BUILDX_VERSION=0.9.1

FROM vsiri/recipe:gosu as gosu
FROM vsiri/recipe:tini-musl as tini
FROM vsiri/recipe:jq as jq
# FROM vsiri/recipe:vsi as vsi
FROM vsiri/recipe:docker as docker
FROM vsiri/recipe:docker-compose as docker-compose
FROM docker/buildx-bin:${DOCKER_BUILDX_VERSION} as buildx
FROM vsiri/recipe:gosu AS gosu
FROM vsiri/recipe:tini-musl AS tini
FROM vsiri/recipe:jq AS jq
# FROM vsiri/recipe:vsi AS vsi
FROM vsiri/recipe:docker AS docker
FROM vsiri/recipe:docker-compose AS docker-compose
FROM docker/buildx-bin:${DOCKER_BUILDX_VERSION} AS buildx

FROM bash:${BASH_VERSION}

Expand Down
14 changes: 7 additions & 7 deletions docker/tests/os.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
ARG OS
ARG DOCKER_BUILDX_VERSION=0.9.1

FROM vsiri/recipe:docker as docker
FROM vsiri/recipe:docker-compose as docker-compose
FROM vsiri/recipe:git-lfs as git-lfs
FROM vsiri/recipe:jq as jq
FROM vsiri/recipe:conda-python as conda-python
FROM docker/buildx-bin:${DOCKER_BUILDX_VERSION} as buildx
FROM vsiri/recipe:docker AS docker
FROM vsiri/recipe:docker-compose AS docker-compose
FROM vsiri/recipe:git-lfs AS git-lfs
FROM vsiri/recipe:jq AS jq
FROM vsiri/recipe:conda-python AS conda-python
FROM docker/buildx-bin:${DOCKER_BUILDX_VERSION} AS buildx

# FROM busybox:latest as wget
# FROM busybox:latest AS wget

FROM ${OS}

Expand Down
6 changes: 3 additions & 3 deletions docker/tests/python2.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM vsiri/recipe:pipenv as pipenv
FROM vsiri/recipe:pipenv AS pipenv

FROM python:2 as dep_stage
FROM python:2 AS dep_stage
SHELL ["/usr/bin/env", "bash", "-euxvc"]

COPY --from=pipenv /usr/local /usr/local
Expand All @@ -15,7 +15,7 @@ ENV WORKON_HOME=/venv \

###############################################################################

FROM dep_stage as pipenv_cache
FROM dep_stage AS pipenv_cache

ADD Pipfile2 Pipfile2.lock /vsi/docker/tests/

Expand Down
6 changes: 3 additions & 3 deletions docker/tests/python3.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM vsiri/recipe:pipenv as pipenv
FROM vsiri/recipe:pipenv AS pipenv

FROM python:3 as dep_stage
FROM python:3 AS dep_stage
SHELL ["/usr/bin/env", "bash", "-euxvc"]

# For wxPython, which I don't actually need
Expand All @@ -23,7 +23,7 @@ ENV WORKON_HOME=/venv \

###############################################################################

FROM dep_stage as pipenv_cache
FROM dep_stage AS pipenv_cache

# For wxPython, which I don't actually need
# RUN apt-get update; \
Expand Down
12 changes: 6 additions & 6 deletions docker/vsi_common/bashcov.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
FROM vsiri/recipe:gosu as gosu
FROM vsiri/recipe:tini as tini
FROM vsiri/recipe:jq as jq
FROM vsiri/recipe:vsi as vsi
FROM vsiri/recipe:docker as docker
FROM docker/compose:alpine-1.25.4 as docker-compose
FROM vsiri/recipe:gosu AS gosu
FROM vsiri/recipe:tini AS tini
FROM vsiri/recipe:jq AS jq
FROM vsiri/recipe:vsi AS vsi
FROM vsiri/recipe:docker AS docker
FROM docker/compose:alpine-1.25.4 AS docker-compose

FROM ruby:2.6.5-buster

Expand Down
6 changes: 3 additions & 3 deletions docker/vsi_common/makeself.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM vsiri/recipe:tini-musl as tini
FROM vsiri/recipe:gosu as gosu
FROM vsiri/recipe:vsi as vsi
FROM vsiri/recipe:tini-musl AS tini
FROM vsiri/recipe:gosu AS gosu
FROM vsiri/recipe:vsi AS vsi

FROM alpine:3.13

Expand Down
8 changes: 4 additions & 4 deletions docker/vsi_common/pyinstaller.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FROM vsiri/recipe:gosu as gosu
FROM vsiri/recipe:tini as tini
FROM vsiri/recipe:pipenv as pipenv
FROM vsiri/recipe:vsi as vsi
FROM vsiri/recipe:gosu AS gosu
FROM vsiri/recipe:tini AS tini
FROM vsiri/recipe:pipenv AS pipenv
FROM vsiri/recipe:vsi AS vsi

FROM centos:6

Expand Down
8 changes: 4 additions & 4 deletions docker/vsi_common/sphinx.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FROM vsiri/recipe:gosu as gosu
FROM vsiri/recipe:tini as tini
FROM vsiri/recipe:pipenv as pipenv
FROM vsiri/recipe:vsi as vsi
FROM vsiri/recipe:gosu AS gosu
FROM vsiri/recipe:tini AS tini
FROM vsiri/recipe:pipenv AS pipenv
FROM vsiri/recipe:vsi AS vsi

FROM python:3.10.11

Expand Down
12 changes: 6 additions & 6 deletions tests/test-docker_functions.bsh
Original file line number Diff line number Diff line change
Expand Up @@ -837,25 +837,25 @@ EOF
assert_str_eq "${stage_names[*]-}" ""

cat - << EOF > Dockerfile
FROM image1 as foo
FROM image1 AS foo
FROM foo
EOF
stage_names=($(get_docker_stage_names Dockerfile))
assert_str_eq "${stage_names[*]}" "foo"

cat - << EOF > Dockerfile
FROM image1 as foo
FROM image2 as bar
FROM image1 AS foo
FROM image2 AS bar
FROM foo
EOF
stage_names=($(get_docker_stage_names Dockerfile))
assert_str_eq "${stage_names[*]}" "foo bar"

# Comments and spaces
cat - << EOF > Dockerfile
FROM image1 as foo
# FROM image2 as bar
# FROM image3 as car
FROM image1 AS foo
# FROM image2 AS bar
# FROM image3 AS car
FROM foo
EOF
stage_names=($(get_docker_stage_names Dockerfile))
Expand Down
14 changes: 7 additions & 7 deletions tests/test-just_docker_functions.bsh
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,9 @@ begin_test "docker-compose restore from cache"
dockerfile: foo.Dockerfile
version: '2.5'"

echo "FROM \${VSI_RECIPE_REPO}:foo as bar
echo "FROM \${VSI_RECIPE_REPO}:foo AS bar
from \${VSI_RECIPE_REPO}:boo AS far
FROM alpine:3 as stuff
FROM alpine:3 AS stuff
RUN something
FROM stuff
RUN more things
Expand All @@ -97,7 +97,7 @@ D compose -f ${TESTDIR}/tmp3 push"
assert_str_eq "${cmd}" "${ans}"

# No recipes
echo "FROM alpine:3 as stuff
echo "FROM alpine:3 AS stuff
RUN something
FROM stuff
RUN more things
Expand Down Expand Up @@ -132,7 +132,7 @@ D compose -f ${TESTDIR}/tmp3 push"
version: '2.5'"

mkdir bar
echo "FROM alpine:3 as stuff
echo "FROM alpine:3 AS stuff
RUN something
FROM stuff
RUN more things
Expand Down Expand Up @@ -285,8 +285,8 @@ begin_test "get docker recipes"
(
setup_test
cat - << EOF > Something.Dockerfile
FROM \${VSI_RECIPE_REPO}:gosu as foo
# FROM \${VSI_RECIPE_REPO}:commented as out
FROM \${VSI_RECIPE_REPO}:gosu AS foo
# FROM \${VSI_RECIPE_REPO}:commented AS out
RUN stuff
from \${VSI_RECIPE_REPO}:tini as bar
FROM alpine
Expand All @@ -295,7 +295,7 @@ EOF
assert_str_eq "$(get_docker_recipes Something.Dockerfile)" $'gosu\ntini'

cat - << EOF > Something.Dockerfile
FROM not_recipe:gosu as foo
FROM not_recipe:gosu AS foo
RUN stuff
from not_recipe:tini as bar
FROM alpine
Expand Down

0 comments on commit a109f58

Please sign in to comment.