zwangsheng commented on code in PR #1: URL: https://github.com/apache/kyuubi-docker/pull/1#discussion_r1091362886
########## .github/workflows/docker-image.yml: ########## @@ -0,0 +1,58 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +name: Publish Docker image + +on: + push: + tags: + - '*' + +jobs: + push_to_registry: + name: Push Docker image to Docker Hub + if: ${{ startsWith(github.repository, 'apache/') }} + runs-on: ubuntu-22.04 + strategy: + matrix: + include: + - suffix-name: '' + opts: '--flink-provided --spark-provided --hive-provided' + - suffix-name: '-spark' + opts: '--flink-provided --hive-provided' + - suffix-name: '-flink' + opts: '--spark-provided --hive-provided' + - suffix-name: '-all' + opts: '' + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Login to Docker Hub + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKERHUB_USER }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + - name: Build Kyuubi Docker Image + run: | + wget -O kyuubi.tgz https://archive.apache.org/dist/kyuubi/kyuubi-$(cat release/release_version)/apache-kyuubi-$(cat release/release_version)-source.tgz + tar -xvf kyuubi.tgz --strip-components=1 + ./build/dist ${{ matrix.opts }} -Dmaven.javadoc.skip=true -Dmaven.scaladoc.skip=true -Drat.skip=true -Dscalastyle.skip=true -Dspotless.check.skip -DskipTests + docker build --tag apache/kyuubi:$(cat release/release_version)${{ matrix.suffix-name }} --file $(cat release/release_version)/*/Dockerfile . Review Comment: Understand, but we can compare it side-by-side with build spark docker image in dev(source code) mode by `./bin/docker-image-tools.sh`. > Create a smaller build context for docker in dev builds to make the build faster. Docker > uploads all of the current directory to the daemon, and it can get pretty big with dev > builds that contain test log files and other artifacts. > > Three build contexts are created, one for each image: base, pyspark, and sparkr. For them > to have the desired effect, the docker command needs to be executed inside the appropriate > context directory. > > Note: docker does not support symlinks in the build context. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@kyuubi.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org