diff --git a/cmd/sdk-server/main.go b/cmd/sdk-server/main.go index 5a4167fb03..5f90fa2c4a 100644 --- a/cmd/sdk-server/main.go +++ b/cmd/sdk-server/main.go @@ -174,7 +174,8 @@ func main() { func registerLocal(grpcServer *grpc.Server, ctlConf config) (func(), error) { filePath := "" if ctlConf.LocalFile != "" { - filePath, err := filepath.Abs(ctlConf.LocalFile) + var err error + filePath, err = filepath.Abs(ctlConf.LocalFile) if err != nil { return nil, err } diff --git a/examples/cpp-simple/Dockerfile b/examples/cpp-simple/Dockerfile index 3bf7783a08..86071ac1a8 100644 --- a/examples/cpp-simple/Dockerfile +++ b/examples/cpp-simple/Dockerfile @@ -37,9 +37,7 @@ RUN cd cpp-simple && mkdir -p .build && \ FROM debian:stretch RUN useradd -u 1000 -m server -COPY --from=builder /project/cpp-simple/.build/.bin/cpp-simple /home/server/cpp-simple -RUN chown -R server /home/server && \ - chmod o+x /home/server/cpp-simple +COPY --from=builder --chown=server:server /project/cpp-simple/.build/.bin/cpp-simple /home/server/cpp-simple USER 1000 ENTRYPOINT /home/server/cpp-simple \ No newline at end of file diff --git a/examples/rust-simple/Dockerfile b/examples/rust-simple/Dockerfile index 56473851ae..5eb0ebb019 100644 --- a/examples/rust-simple/Dockerfile +++ b/examples/rust-simple/Dockerfile @@ -54,9 +54,7 @@ RUN make build FROM debian:stretch RUN useradd -u 1000 -m server -COPY --from=builder /home/builder/agones/examples/rust-simple/target/release/rust-simple /home/server/rust-simple -RUN chown -R server /home/server && \ - chmod o+x /home/server/rust-simple +COPY --from=builder --chown=server:server /home/builder/agones/examples/rust-simple/target/release/rust-simple /home/server/rust-simple USER 1000 ENTRYPOINT /home/server/rust-simple