Skip to content

Commit 5ee0c4e

Browse files
committed
Fixes sandbox drift issues
1 parent 126fd45 commit 5ee0c4e

File tree

8 files changed

+31
-101
lines changed

8 files changed

+31
-101
lines changed

sandboxes/cleartext-xfcc-mode/docker-compose.yaml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,12 @@ services:
2929
- "10000:10000"
3030

3131
fleetspeak-server:
32-
build:
33-
context: .
34-
dockerfile: ../shared/fleetspeak-server/Dockerfile
32+
image: ghcr.io/google/fleetspeak:latest
3533
hostname: fleetspeak-server
3634
depends_on:
3735
mysql-server:
3836
condition: service_healthy
39-
entrypoint: ["/app/bin/server", "-components_config", "/config/fleetspeak-server/components.textproto", "-services_config", "/config/fleetspeak-server/services.textproto", "-alsologtostderr"]
37+
entrypoint: ["/fleetspeak/bin/server", "-components_config", "/config/fleetspeak-server/components.textproto", "-services_config", "/config/fleetspeak-server/services.textproto", "-alsologtostderr"]
4038
volumes:
4139
- "./config:/config"
4240
ports:
@@ -60,6 +58,6 @@ services:
6058
depends_on:
6159
fleetspeak-server:
6260
condition: service_healthy
63-
entrypoint: ["/app/bin/client", "-config", "/config/fleetspeak-client/config.textproto", "-alsologtostderr"]
61+
entrypoint: ["/fleetspeak/bin/client", "-config", "/config/fleetspeak-client/config.textproto", "-alsologtostderr"]
6462
volumes:
6563
- "./config:/config"

sandboxes/direct-mtls-mode/docker-compose.yaml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,12 @@ services:
1919
retries: 10
2020

2121
fleetspeak-server:
22-
build:
23-
context: .
24-
dockerfile: ../shared/fleetspeak-server/Dockerfile
22+
image: ghcr.io/google/fleetspeak:latest
2523
hostname: fleetspeak-frontend
2624
depends_on:
2725
mysql-server:
2826
condition: service_healthy
29-
entrypoint: ["/app/bin/server", "-components_config", "/config/fleetspeak-server/components.textproto", "-services_config", "/config/fleetspeak-server/services.textproto", "-alsologtostderr"]
27+
entrypoint: ["/fleetspeak/bin/server", "-components_config", "/config/fleetspeak-server/components.textproto", "-services_config", "/config/fleetspeak-server/services.textproto", "-alsologtostderr"]
3028
volumes:
3129
- "./config:/config"
3230
ports:
@@ -50,6 +48,6 @@ services:
5048
depends_on:
5149
fleetspeak-server:
5250
condition: service_healthy
53-
entrypoint: ["/app/bin/client", "-config", "/config/fleetspeak-client/config.textproto", "-alsologtostderr"]
51+
entrypoint: ["/fleetspeak/bin/client", "-config", "/config/fleetspeak-client/config.textproto", "-alsologtostderr"]
5452
volumes:
5553
- "./config:/config"

sandboxes/https-header-mode/docker-compose.yaml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,12 @@ services:
2929
- "10000:10000"
3030

3131
fleetspeak-server:
32-
build:
33-
context: .
34-
dockerfile: ../shared/fleetspeak-server/Dockerfile
32+
image: ghcr.io/google/fleetspeak:latest
3533
hostname: fleetspeak-server
3634
depends_on:
3735
mysql-server:
3836
condition: service_healthy
39-
entrypoint: ["/app/bin/server", "-components_config", "/config/fleetspeak-server/components.textproto", "-services_config", "/config/fleetspeak-server/services.textproto", "-alsologtostderr"]
37+
entrypoint: ["/fleetspeak/bin/server", "-components_config", "/config/fleetspeak-server/components.textproto", "-services_config", "/config/fleetspeak-server/services.textproto", "-alsologtostderr"]
4038
volumes:
4139
- "./config:/config"
4240
ports:
@@ -60,6 +58,6 @@ services:
6058
depends_on:
6159
fleetspeak-server:
6260
condition: service_healthy
63-
entrypoint: ["/app/bin/client", "-config", "/config/fleetspeak-client/config.textproto", "-alsologtostderr"]
61+
entrypoint: ["/fleetspeak/bin/client", "-config", "/config/fleetspeak-client/config.textproto", "-alsologtostderr"]
6462
volumes:
6563
- "./config:/config"

sandboxes/passthrough-mode/docker-compose.yaml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,12 @@ services:
3131
- '10003'
3232

3333
fleetspeak-server:
34-
build:
35-
context: .
36-
dockerfile: ../shared/fleetspeak-server/Dockerfile
34+
image: ghcr.io/google/fleetspeak:latest
3735
hostname: fleetspeak-server
3836
depends_on:
3937
mysql-server:
4038
condition: service_healthy
41-
entrypoint: ["/app/bin/server", "-components_config", "/config/fleetspeak-server/components.textproto", "-services_config", "/config/fleetspeak-server/services.textproto", "-alsologtostderr"]
39+
entrypoint: ["/fleetspeak/bin/server", "-components_config", "/config/fleetspeak-server/components.textproto", "-services_config", "/config/fleetspeak-server/services.textproto", "-alsologtostderr"]
4240
volumes:
4341
- "./config:/config"
4442
ports:
@@ -62,6 +60,6 @@ services:
6260
depends_on:
6361
fleetspeak-server:
6462
condition: service_healthy
65-
entrypoint: ["/app/bin/client", "-config", "/config/fleetspeak-client/config.textproto", "-alsologtostderr"]
63+
entrypoint: ["/fleetspeak/bin/client", "-config", "/config/fleetspeak-client/config.textproto", "-alsologtostderr"]
6664
volumes:
6765
- "./config:/config"

sandboxes/shared/envoy/Dockerfile

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ COPY --chmod=644 cert.pem /etc/cert.pem
1717
COPY --chmod=644 key.pem /etc/key.pem
1818
CMD ["/usr/local/bin/envoy", "-c", "/etc/envoy.yaml"]
1919

20-
FROM envoy-base as envoy-admin
20+
FROM envoy-base AS envoy-admin
2121
ARG ENVOY_ADMIN_PORT=10001
2222
ENV ENVOY_ADMIN_PORT="$ENVOY_ADMIN_PORT"
2323
HEALTHCHECK \
@@ -28,15 +28,15 @@ HEALTHCHECK \
2828
CMD curl -s "localhost:${ENVOY_ADMIN_PORT}/stats?filter=server.state" | grep 0 \
2929
&& curl -s "localhost:${ENVOY_ADMIN_PORT}/stats?filter=listener_manager.workers_started" | grep 1
3030

31-
FROM envoy-base as envoy-fault-injection
31+
FROM envoy-base AS envoy-fault-injection
3232
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
3333
--mount=type=cache,target=/var/lib/apt/lists,sharing=locked \
3434
apt-get -qq update -y \
3535
&& apt-get -qq install --no-install-recommends -y tree
3636
COPY enable_delay_fault_injection.sh disable_delay_fault_injection.sh enable_abort_fault_injection.sh disable_abort_fault_injection.sh send_request.sh /
3737

3838

39-
FROM envoy-base as envoy-jaeger-native
39+
FROM envoy-base AS envoy-jaeger-native
4040
#
4141
# for discussion on jaeger binary compatibility, and the source of the file, see here:
4242
# https://github.com/envoyproxy/envoy/issues/11382#issuecomment-638012072
@@ -49,7 +49,7 @@ RUN echo "4a7d17d4724ee890490bcd6cfdedb12a02316a3d33214348d30979abd201f1ca /usr/
4949
&& rm /tmp/checksum
5050

5151

52-
FROM envoy-base as envoy-load-balancing
52+
FROM envoy-base AS envoy-load-balancing
5353
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
5454
--mount=type=cache,target=/var/lib/apt/lists,sharing=locked \
5555
apt-get -qq update -y \
@@ -58,40 +58,40 @@ COPY ./client.py /client.py
5858
EXPOSE 8001
5959

6060

61-
FROM envoy-base as envoy-double-proxy-base
61+
FROM envoy-base AS envoy-double-proxy-base
6262
COPY --chmod=777 ./certs/ca.crt /certs/cacert.pem
6363

6464

65-
FROM envoy-double-proxy-base as envoy-double-proxy-frontend
65+
FROM envoy-double-proxy-base AS envoy-double-proxy-frontend
6666
COPY --chmod=777 ./certs/postgres-frontend.example.com.crt /certs/clientcert.pem
6767
COPY --chmod=777 ./certs/example.com.key /certs/clientkey.pem
6868

6969

70-
FROM envoy-double-proxy-base as envoy-double-proxy-backend
70+
FROM envoy-double-proxy-base AS envoy-double-proxy-backend
7171
COPY --chmod=777 ./certs/postgres-backend.example.com.crt /certs/servercert.pem
7272
COPY --chmod=777 ./certs/example.com.key /certs/serverkey.pem
7373

7474

75-
FROM envoy-base as envoy-certs
75+
FROM envoy-base AS envoy-certs
7676
COPY --chmod=777 ./certs /certs
7777

7878

79-
FROM envoy-base as envoy-lua
79+
FROM envoy-base AS envoy-lua
8080
ADD --chmod=777 ./lib/mylibrary.lua /lib/mylibrary.lua
8181

8282

83-
FROM envoy-base as envoy-go
83+
FROM envoy-base AS envoy-go
8484
ENV GODEBUG=cgocheck=0
8585
COPY --chmod=777 ./lib/simple.so /lib/simple.so
8686

8787

88-
FROM envoy-base as envoy-ext_authz
88+
FROM envoy-base AS envoy-ext_authz
8989
COPY --chmod=777 ./config /etc/envoy-config
9090
COPY --chmod=777 ./run_envoy.sh /run_envoy.sh
9191
CMD ["/bin/sh", "/run_envoy.sh"]
9292

9393

94-
FROM envoy-base as envoy-dynamic-fs
94+
FROM envoy-base AS envoy-dynamic-fs
9595
COPY --chmod=777 ./configs /var/lib/envoy
9696

9797

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2023 Google LLC
1+
# Copyright 2025 Google LLC
22
#
33
# Licensed under the Apache License, Version 2.0 (the "License");
44
# you may not use this file except in compliance with the License.
@@ -11,7 +11,8 @@
1111
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
14-
FROM golang:1.22 as builder
14+
FROM ghcr.io/google/fleetspeak:latest AS fleetspeakbin
15+
FROM golang:1.22 AS builder
1516

1617
RUN apt update && \
1718
apt install -y python3-venv && \
@@ -24,21 +25,10 @@ SHELL ["/bin/bash", "-c"]
2425

2526
RUN git clone https://github.com/google/fleetspeak.git && \
2627
cd fleetspeak && \
27-
go get -u golang.org/x/lint/golint && \
28-
./fleetspeak/generate_protos_setup.sh
29-
30-
ENV PATH="$HOME/.local/bin:$PATH"
31-
32-
RUN mkdir -p /app/bin
33-
34-
RUN cd /fleetspeak && \
3528
python3 -m venv /venv/FSENV && \
3629
source /venv/FSENV/bin/activate && \
3730
pip install wheel pytest && \
3831
pip install -e ./fleetspeak_python[test] && \
39-
pip install -e ./frr_python && \
40-
./fleetspeak/generate_protos.sh && \
41-
go build -o /app/bin/server ./cmd/fleetspeak_server && \
42-
go build -o /app/bin/client ./cmd/fleetspeak_client && \
43-
go build -o /app/bin/fleetspeak_config ./cmd/fleetspeak_config
32+
pip install -e ./frr_python
4433

34+
COPY --from=fleetspeakbin /fleetspeak/bin/client /fleetspeak/bin/client

sandboxes/shared/fleetspeak-server/Dockerfile

Lines changed: 0 additions & 52 deletions
This file was deleted.

sandboxes/shared/greeter/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2023 Google LLC
1+
# Copyright 2025 Google LLC
22
#
33
# Licensed under the Apache License, Version 2.0 (the "License");
44
# you may not use this file except in compliance with the License.
@@ -11,7 +11,7 @@
1111
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
14-
FROM golang:1.22 as builder
14+
FROM golang:1.22 AS builder
1515

1616
RUN apt update && \
1717
apt install -y python3-venv && \

0 commit comments

Comments
 (0)