Skip to content

Commit

Permalink
source image update
Browse files Browse the repository at this point in the history
  • Loading branch information
ruokun-niu committed Jan 23, 2025
1 parent d0d29ac commit 881fb67
Show file tree
Hide file tree
Showing 13 changed files with 217 additions and 123 deletions.
34 changes: 19 additions & 15 deletions sources/cosmosdb/cosmosdb-ffcf-reactivator/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
# Copyright 2024 The Drasi Authors.
#
# Licensed 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.

# Copyright 2024 The Drasi Authors.
#
# Licensed 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 RUNTIME_ENV=production
FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk@sha256:6df1177e48b55272316d08f19cb383483af82aca5cdc67a76c414bc200847624 AS build-env

WORKDIR /app
Expand All @@ -23,8 +24,11 @@ COPY . ./
RUN dotnet publish -o out


FROM --platform=$TARGETPLATFORM mcr.microsoft.com/dotnet/runtime@sha256:437cda84bdce26ce074d88b63abeec567c7226d73e8b911605077468e1d5c8d5
FROM mcr.microsoft.com/dotnet/runtime@sha256:437cda84bdce26ce074d88b63abeec567c7226d73e8b911605077468e1d5c8d5 AS production
FROM ubuntu:22.04 AS debug
RUN apt-get update && apt-get install -y bash curl && rm -rf /var/lib/apt/lists/*

FROM ${RUNTIME_ENV} AS final
WORKDIR /app
COPY --from=build-env /app/out .
ENTRYPOINT [ "dotnet", "cosmosdb-reactivator.dll" ]
25 changes: 13 additions & 12 deletions sources/cosmosdb/gremlin-proxy/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,17 @@
# See the License for the specific language governing permissions and
# limitations under the License.

FROM node@sha256:6239c8a63890ed145ae719574112bc2e37e839a56323bef8d292a579102cdfc2
#node:18-alpine3.16

WORKDIR /usr/src/app

COPY package*.json ./

RUN npm install

RUN npm audit fix
COPY . .

FROM node@sha256:6239c8a63890ed145ae719574112bc2e37e839a56323bef8d292a579102cdfc2
#node:18-alpine3.16

WORKDIR /usr/src/app

COPY package*.json ./

RUN npm install

RUN npm audit fix
RUN if [ "$RUNTIME_ENV" = "debug" ]; then apk add --no-cache bash curl ; fi
COPY . .

CMD ["node", "sourceProxy.js"]
35 changes: 20 additions & 15 deletions sources/dataverse/dataverse-proxy/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
# Copyright 2024 The Drasi Authors.
#
# Licensed 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.

# Copyright 2024 The Drasi Authors.
#
# Licensed 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 RUNTIME_ENV=production
FROM --platform=$TARGETPLATFORM mcr.microsoft.com/dotnet/aspnet@sha256:38178966094e8ac38ac3377fa4195cbf63e9aef4030f5e62d2810f8a5df769e4 AS base
# mcr.microsoft.com/dotnet/aspnet:8.0
WORKDIR /app
Expand All @@ -30,7 +31,11 @@ RUN dotnet build "dataverse-proxy.csproj" -c Release -o /app/build
FROM build AS publish
RUN dotnet publish "dataverse-proxy.csproj" -c Release -o /app/publish /p:UseAppHost=false

FROM base AS final
FROM mcr.microsoft.com/dotnet/aspnet@sha256:38178966094e8ac38ac3377fa4195cbf63e9aef4030f5e62d2810f8a5df769e4 AS production
FROM ubuntu:22.04 AS debug
RUN apt-get update && apt-get install -y bash curl && rm -rf /var/lib/apt/lists/*

FROM ${RUNTIME_ENV} AS final
WORKDIR /app
COPY --from=publish /app/publish .
ENTRYPOINT ["dotnet", "dataverse-proxy.dll"]
35 changes: 20 additions & 15 deletions sources/dataverse/dataverse-reactivator/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
# Copyright 2024 The Drasi Authors.
#
# Licensed 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.

# Copyright 2024 The Drasi Authors.
#
# Licensed 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 RUNTIME_ENV=production
FROM --platform=$TARGETPLATFORM mcr.microsoft.com/dotnet/aspnet@sha256:38178966094e8ac38ac3377fa4195cbf63e9aef4030f5e62d2810f8a5df769e4 AS base
# mcr.microsoft.com/dotnet/aspnet:8.0
WORKDIR /app
Expand All @@ -30,7 +31,11 @@ RUN dotnet build "dataverse-reactivator.csproj" -c Release -o /app/build
FROM build AS publish
RUN dotnet publish "dataverse-reactivator.csproj" -c Release -o /app/publish /p:UseAppHost=false

FROM base AS final
FROM mcr.microsoft.com/dotnet/aspnet@sha256:38178966094e8ac38ac3377fa4195cbf63e9aef4030f5e62d2810f8a5df769e4 AS production
FROM ubuntu:22.04 AS debug
RUN apt-get update && apt-get install -y bash curl && rm -rf /var/lib/apt/lists/*

FROM ${RUNTIME_ENV} AS final
WORKDIR /app
COPY --from=publish /app/publish .
ENTRYPOINT ["dotnet", "dataverse-reactivator.dll"]
35 changes: 20 additions & 15 deletions sources/eventhub/eventhub-proxy/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
# Copyright 2024 The Drasi Authors.
#
# Licensed 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.

# Copyright 2024 The Drasi Authors.
#
# Licensed 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 RUNTIME_ENV=production
FROM --platform=$TARGETPLATFORM mcr.microsoft.com/dotnet/aspnet@sha256:38178966094e8ac38ac3377fa4195cbf63e9aef4030f5e62d2810f8a5df769e4 AS base
# mcr.microsoft.com/dotnet/aspnet:8.0
WORKDIR /app
Expand All @@ -30,7 +31,11 @@ RUN dotnet build "eventhub-proxy.csproj" -c Release -o /app/build
FROM build AS publish
RUN dotnet publish "eventhub-proxy.csproj" -c Release -o /app/publish /p:UseAppHost=false

FROM base AS final
FROM mcr.microsoft.com/dotnet/aspnet@sha256:38178966094e8ac38ac3377fa4195cbf63e9aef4030f5e62d2810f8a5df769e4 AS production
FROM ubuntu:22.04 AS debug
RUN apt-get update && apt-get install -y bash curl && rm -rf /var/lib/apt/lists/*

FROM ${RUNTIME_ENV} AS final
WORKDIR /app
COPY --from=publish /app/publish .
ENTRYPOINT ["dotnet", "eventhub-proxy.dll"]
35 changes: 20 additions & 15 deletions sources/eventhub/eventhub-reactivator/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
# Copyright 2024 The Drasi Authors.
#
# Licensed 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.

# Copyright 2024 The Drasi Authors.
#
# Licensed 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 RUNTIME_ENV=production
FROM --platform=$TARGETPLATFORM mcr.microsoft.com/dotnet/aspnet@sha256:38178966094e8ac38ac3377fa4195cbf63e9aef4030f5e62d2810f8a5df769e4 AS base
# mcr.microsoft.com/dotnet/aspnet:8.0
WORKDIR /app
Expand All @@ -30,7 +31,11 @@ RUN dotnet build "eventhub-reactivator.csproj" -c Release -o /app/build
FROM build AS publish
RUN dotnet publish "eventhub-reactivator.csproj" -c Release -o /app/publish /p:UseAppHost=false

FROM base AS final
FROM mcr.microsoft.com/dotnet/aspnet@sha256:38178966094e8ac38ac3377fa4195cbf63e9aef4030f5e62d2810f8a5df769e4 AS production
FROM ubuntu:22.04 AS debug
RUN apt-get update && apt-get install -y bash curl && rm -rf /var/lib/apt/lists/*

FROM ${RUNTIME_ENV} AS final
WORKDIR /app
COPY --from=publish /app/publish .
ENTRYPOINT ["dotnet", "eventhub-reactivator.dll"]
24 changes: 22 additions & 2 deletions sources/kubernetes/kubernetes-proxy/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
# Copyright 2024 The Drasi Authors.
#
# Licensed 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 RUNTIME_ENV=production
FROM rust@sha256:8fae3b1a63a4dcfb6cf277a49fb5967ccbf479b9e9cee4588a077a9cb216e6d4 as builder
# rust:1.81-bullseye
RUN apt-get update && apt-get install -y protobuf-compiler libcurl4 && apt-get clean
Expand All @@ -7,8 +22,13 @@ COPY . .
WORKDIR /usr/src
RUN cargo install --force --path .

FROM gcr.io/distroless/cc-debian11@sha256:55a5e011b2c4246b4c51e01fcc2b452d151e03df052e357465f0392fcd59fddf
# gcr.io/distroless/cc-debian11

FROM gcr.io/distroless/cc-debian11@sha256:55a5e011b2c4246b4c51e01fcc2b452d151e03df052e357465f0392fcd59fddf AS production

FROM ubuntu:22.04 AS debug
RUN apt-get update && apt-get install -y openssl bash curl libssl3 && rm -rf /var/lib/apt/lists/*

FROM ${RUNTIME_ENV} AS final
ENV RUST_BACKTRACE=1
COPY --from=builder /usr/local/cargo/bin/kubernetes-proxy /usr/local/bin/kubernetes-proxy
CMD ["kubernetes-proxy"]
22 changes: 21 additions & 1 deletion sources/kubernetes/kubernetes-reactivator/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
# Copyright 2024 The Drasi Authors.
#
# Licensed 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 RUNTIME_ENV=production
FROM rust@sha256:8fae3b1a63a4dcfb6cf277a49fb5967ccbf479b9e9cee4588a077a9cb216e6d4 as builder
# rust:1.81-bullseye
RUN apt-get update && apt-get install -y protobuf-compiler libcurl4 && apt-get clean
Expand All @@ -7,7 +22,12 @@ COPY . .
WORKDIR /usr/src
RUN cargo install --force --path .

FROM gcr.io/distroless/cc-debian11@sha256:55a5e011b2c4246b4c51e01fcc2b452d151e03df052e357465f0392fcd59fddf
FROM gcr.io/distroless/cc-debian11@sha256:55a5e011b2c4246b4c51e01fcc2b452d151e03df052e357465f0392fcd59fddf AS production

FROM ubuntu:22.04 AS debug
RUN apt-get update && apt-get install -y openssl bash curl libssl3 && rm -rf /var/lib/apt/lists/*

FROM ${RUNTIME_ENV} AS final
# gcr.io/distroless/cc-debian11
ENV RUST_BACKTRACE=1
COPY --from=builder /usr/local/cargo/bin/kubernetes-reactivator /usr/local/bin/kubernetes-reactivator
Expand Down
8 changes: 7 additions & 1 deletion sources/relational/debezium-reactivator/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

ARG RUNTIME_ENV=production
#
# Build stage
#
Expand All @@ -24,6 +25,11 @@ RUN cd /home/app && mvn dependency:tree
#
# Package stage
#
FROM --platform=$TARGETPLATFORM mcr.microsoft.com/openjdk/jdk:21-distroless
FROM --platform=$TARGETPLATFORM mcr.microsoft.com/openjdk/jdk:21-distroless as production

FROM --platform=$TARGETPLATFORM ubuntu:20.04 AS debug
RUN apt-get update && apt-get install -y bash curl openjdk-21-jdk && rm -rf /var/lib/apt/lists/*

FROM ${RUNTIME_ENV} AS final
COPY --from=build /home/app/target /home/app
CMD ["-jar","/home/app/debezium-reactivator-1.0.jar"]
8 changes: 7 additions & 1 deletion sources/relational/sql-proxy/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

ARG RUNTIME_ENV=production
#
# Build stage
#
Expand All @@ -24,6 +25,11 @@ RUN cd /home/app && mvn dependency:tree
#
# Package stage
#
FROM --platform=$TARGETPLATFORM mcr.microsoft.com/openjdk/jdk:21-distroless
FROM --platform=$TARGETPLATFORM mcr.microsoft.com/openjdk/jdk:21-distroless as production

FROM --platform=$TARGETPLATFORM ubuntu:20.04 AS debug
RUN apt-get update && apt-get install -y bash curl openjdk-21-jdk && rm -rf /var/lib/apt/lists/*

FROM ${RUNTIME_ENV} AS final
COPY --from=build /home/app/target /home/app
CMD ["-jar","/home/app/sql-proxy-1.0.jar"]
Loading

0 comments on commit 881fb67

Please sign in to comment.