Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Refactoring of dockerfiles#215

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
Show file tree
Hide file tree
Changes from1 commit
Commits
Show all changes
10 commits
Select commitHold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
NextNext commit
Refactoring of dockerfiles
Let's to try using a pure dockerfile' logic.It is the fist step.- We use docker instead docker-composer- We upgrade and use only "std" plaform. Other plaforms will be upgraded later
  • Loading branch information
@dmitry-lipetsk
dmitry-lipetsk committedMar 12, 2025
commitb590afa52adc1eb1a42164e0578278e5ab14b744
9 changes: 4 additions & 5 deletions.travis.yml
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -8,11 +8,10 @@ services:
- docker

install:
- ./mk_dockerfile.sh
- docker-compose build
- docker build --build-arg PG_VERSION="${PG_VERSION}" --build-arg PYTHON_VERSION="${PYTHON_VERSION}" -t tests -f Dockerfile--${TEST_PLATFORM}.tmpl .

script:
- docker-compose run $(bash <(curl -s https://codecov.io/env)) tests
- docker run $(bash <(curl -s https://codecov.io/env)) tests

notifications:
email:
Expand All@@ -27,5 +26,5 @@ env:
- TEST_PLATFORM=std PYTHON_VERSION=3 PG_VERSION=12
- TEST_PLATFORM=std PYTHON_VERSION=3 PG_VERSION=11
- TEST_PLATFORM=std PYTHON_VERSION=3 PG_VERSION=10
- TEST_PLATFORM=std.all PYTHON_VERSION=3 PG_VERSION=17
- TEST_PLATFORM=ubuntu-24_04 PYTHON_VERSION=3 PG_VERSION=17
# - TEST_PLATFORM=std.all PYTHON_VERSION=3 PG_VERSION=17
# - TEST_PLATFORM=ubuntu-24_04 PYTHON_VERSION=3 PG_VERSION=17
24 changes: 13 additions & 11 deletionsDockerfile--std.tmpl
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,21 @@
FROM postgres:${PG_VERSION}-alpine
ARG PG_VERSION
ARG PYTHON_VERSION

FROM postgres:${PG_VERSION}-alpine as base1

FROM base1 as base2_with_python-2
RUN apk add --no-cache curl python2 python2-dev build-base musl-dev linux-headers py-virtualenv py-pip

FROM base1 as base2_with_python-3
RUN apk add --no-cache curl python3 python3-dev build-base musl-dev linux-headers py-virtualenv

FROM base2_with_python-${PYTHON_VERSION} as final

ENV PYTHON=python${PYTHON_VERSION}
RUN if [ "${PYTHON_VERSION}" = "2" ] ; then \
apk add --no-cache curl python2 python2-dev build-base musl-dev \
linux-headers py-virtualenv py-pip; \
fi
RUN if [ "${PYTHON_VERSION}" = "3" ] ; then \
apk add --no-cache curl python3 python3-dev build-base musl-dev \
linux-headers py-virtualenv; \
fi
ENV LANG=C.UTF-8

ADD . /pg/testgres
WORKDIR /pg/testgres
RUN chown -R postgres:postgres /pg

USER postgres
ENTRYPOINT PYTHON_VERSION=${PYTHON_VERSION} bash run_tests.sh
ENTRYPOINT PYTHON_VERSION="${PYTHON_VERSION}" bash run_tests.sh

[8]ページ先頭

©2009-2025 Movatter.jp