Skip to content

Commit

Permalink
[release-16.0] Fix dubious ownership of git directory in `vitess/base…
Browse files Browse the repository at this point in the history
…` Docker build (#12530) (#12561)

* Fix dubious ownership of git directory in vitess/base Docker build

Signed-off-by: Florent Poinsard <[email protected]>

* Use consistent method to copy and build vitess between base and lite

Signed-off-by: Florent Poinsard <[email protected]>

* fix all base Dockerfiles

Signed-off-by: Florent Poinsard <[email protected]>

---------

Signed-off-by: Florent Poinsard <[email protected]>
Co-authored-by: Florent Poinsard <[email protected]>
  • Loading branch information
vitess-bot[bot] and frouioui authored Mar 7, 2023
1 parent 7666f16 commit 8cae9d6
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 22 deletions.
9 changes: 3 additions & 6 deletions docker/base/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,9 @@ ARG BUILD_GIT_BRANCH
ARG BUILD_GIT_REV

# Re-copy sources from working tree
USER root
COPY . /vt/src/vitess.io/vitess
COPY --chown=vitess:vitess . /vt/src/vitess.io/vitess

USER vitess

# Build Vitess
RUN make build

# Fix permissions
RUN chown -R vitess:vitess /vt
USER vitess
9 changes: 3 additions & 6 deletions docker/base/Dockerfile.mysql57
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,9 @@ ARG BUILD_GIT_BRANCH
ARG BUILD_GIT_REV

# Re-copy sources from working tree
USER root
COPY . /vt/src/vitess.io/vitess
COPY --chown=vitess:vitess . /vt/src/vitess.io/vitess

USER vitess

# Build Vitess
RUN make build

# Fix permissions
RUN chown -R vitess:vitess /vt
USER vitess
9 changes: 3 additions & 6 deletions docker/base/Dockerfile.percona57
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,9 @@ ARG BUILD_GIT_BRANCH
ARG BUILD_GIT_REV

# Re-copy sources from working tree
USER root
COPY . /vt/src/vitess.io/vitess
COPY --chown=vitess:vitess . /vt/src/vitess.io/vitess

USER vitess

# Build Vitess
RUN make build

# Fix permissions
RUN chown -R vitess:vitess /vt
USER vitess
5 changes: 1 addition & 4 deletions docker/base/Dockerfile.percona80
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,8 @@ ARG BUILD_GIT_BRANCH
ARG BUILD_GIT_REV

# Re-copy sources from working tree
USER root
COPY . /vt/src/vitess.io/vitess
COPY --chown=vitess:vitess . /vt/src/vitess.io/vitess

# Fix permissions
RUN chown -R vitess:vitess /vt
USER vitess

# Build Vitess
Expand Down

0 comments on commit 8cae9d6

Please sign in to comment.