andreykus commented on a change in pull request #16563: URL: https://github.com/apache/beam/pull/16563#discussion_r790640966
########## File path: playground/backend/containers/scio/Dockerfile ########## @@ -0,0 +1,70 @@ +############################################################################### +# 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. +############################################################################### +ARG BASE_IMAGE=openjdk:8 +FROM golang:1.17-bullseye AS build + +# Setup Go Environment +ENV GOPATH /go +ENV PATH $GOPATH/bin:$PATH +RUN mkdir -p "$GOPATH/src" "$GOPATH/bin" && chmod -R 777 "$GOPATH" +RUN go install google.golang.org/protobuf/cmd/[email protected] &&\ + go install google.golang.org/grpc/cmd/[email protected] + +# Prepare Application +COPY src /go/src/playground/backend +#COPY playground /go/src/playground/playground +WORKDIR /go/src/playground/backend + +# Build Application +RUN go mod download &&\ + go mod tidy &&\ + cd cmd/server &&\ + go build -o /go/bin/server_scio_backend + +FROM $BASE_IMAGE +ENV SERVER_IP=0.0.0.0 +ENV SERVER_PORT=8080 +ENV APP_WORK_DIR=/opt/playground/backend/ +ENV BEAM_SDK="SDK_SCIO" + +# Copy build result +COPY --from=build /go/bin/server_scio_backend /opt/playground/backend/ +COPY --from=build /go/src/playground/backend/configs /opt/playground/backend/configs/ +COPY --from=build /go/src/playground/backend/logging.properties /opt/playground/backend/ +COPY --from=build /go/src/playground/backend/new_scio_project.sh /opt/playground/backend/ + +# Install sbt +RUN echo "deb https://repo.scala-sbt.org/scalasbt/debian all main" | tee /etc/apt/sources.list.d/sbt.list &&\ +echo "deb https://repo.scala-sbt.org/scalasbt/debian /" | tee /etc/apt/sources.list.d/sbt_old.list &&\ +curl -sL "https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x2EE0EA64E40A89B84B2DF73499E82A75642AC823" | apt-key add +RUN apt-get update && apt-get install sbt Review comment: apt-get install sbt , need , apt-get install -y sbt may need to fix scala version ? -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
