Skip to content

Commit

Permalink
Update Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
ipetr0v committed Feb 18, 2021
1 parent 2902125 commit b037fb2
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 11 deletions.
5 changes: 4 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -281,9 +281,12 @@ RUN make depend && make -j"$(nproc)"&& make install_sw install_ssldirs
ENV PKG_CONFIG_ALLOW_CROSS 1
ENV OPENSSL_STATIC 1

# We use the `docker` user in order to maintain library paths on different
# machines and to make Wasm modules reproducible.
ARG USERNAME=docker

# Placeholder args that are expected to be passed in at image build time.
# See https://code.visualstudio.com/docs/remote/containers-advanced#_creating-a-nonroot-user
ARG USERNAME=user-name-goes-here
ARG USER_UID=1000
ARG USER_GID=${USER_UID}

Expand Down
2 changes: 1 addition & 1 deletion examples/aggregator/client/android/cpp/client.cc
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ JNIEXPORT void JNICALL Java_com_google_oak_aggregator_MainActivity_createChannel
// The particular value corresponds to the hash on the `aggregator.wasm` line in
// https://github.com/project-oak/oak/blob/hashes/reproducibility_index.
oak::label::Label label = oak::WebAssemblyModuleHashLabel(
absl::HexStringToBytes("59f842b6730fb73066fd354307a7abe47fd898e6d55b85545be166b34ab70739"));
absl::HexStringToBytes("444ef109c6a5983e5e2463d47e08ce914ad18859e20f4c7a760af3a7d605285d"));
kChannel = Aggregator::NewStub(oak::ApplicationClient::CreateChannel(
address, oak::ApplicationClient::GetTlsChannelCredentials(ca_cert), label));
JNI_LOG("gRPC channel has been created");
Expand Down
2 changes: 1 addition & 1 deletion examples/aggregator/client/cpp/aggregator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ int main(int argc, char** argv) {
// https://github.com/project-oak/oak/blob/hashes/reproducibility_index.
// TODO(#1674): Add appropriate TLS endpoint tag to the label as well.
oak::label::Label label = oak::WebAssemblyModuleHashLabel(
absl::HexStringToBytes("59f842b6730fb73066fd354307a7abe47fd898e6d55b85545be166b34ab70739"));
absl::HexStringToBytes("444ef109c6a5983e5e2463d47e08ce914ad18859e20f4c7a760af3a7d605285d"));
// Connect to the Oak Application.
auto stub = Aggregator::NewStub(oak::ApplicationClient::CreateChannel(
address, oak::ApplicationClient::GetTlsChannelCredentials(ca_cert), label));
Expand Down
2 changes: 1 addition & 1 deletion examples/aggregator/config.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
grpc_server_listen_address = "[::]:8080"
backend_server_address = "https://localhost:8888"
aggregator_module_hash = "59f842b6730fb73066fd354307a7abe47fd898e6d55b85545be166b34ab70739"
aggregator_module_hash = "444ef109c6a5983e5e2463d47e08ce914ad18859e20f4c7a760af3a7d605285d"
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ f41SClNtR4i46v2Tuh1fQLbt/ZqRr1lENajCW92jyP4=
-----END PUBLIC KEY-----

-----BEGIN SIGNATURE-----
QGEIMRWls3mLOGf4ECOrNA2SgsSQhFSLXcALdLRuBENEr01nt3rnNwDPHmJLmJFZ
VJJWKRhmHX6oqn2qifvoCg==
j6wdrbVB0CzTae/fM2spQH6YjSKM11fGAPgu8rBGzzetWqEM4h3F5IEBea3jZfd8
2dk4AOzBl0CtuK7C6D1BBA==
-----END SIGNATURE-----

-----BEGIN HASH-----
F3va/kDvVQQl+BxuoAk4RemnIeVyjnQcOXlBmPmSkU4=
m0HQVOQ3AzBd9KEawBwK6SlS6N4d05Nf0SEM6LYq/4A=
-----END HASH-----
4 changes: 0 additions & 4 deletions scripts/docker_build
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,10 @@ source "$SCRIPTS_DIR/common"
# https://github.com/googleapis/google-cloud-cpp/blob/a186208b79d900b4ec71c6f9df3acf7638f01dc6/ci/kokoro/docker/build.sh#L147-L152
readonly DOCKER_UID="${UID:-0}"
readonly DOCKER_GID="$(id -g)"
# We use the `oak` Docker user in order to maintain library paths on different
# machines and to make Wasm modules reproducible.
readonly DOCKER_USER="oak"

docker build \
--cache-from="$DOCKER_IMAGE_NAME:latest" \
--tag="$DOCKER_IMAGE_NAME:latest" \
--build-arg=USERNAME="$DOCKER_USER" \
--build-arg=USER_UID="$DOCKER_UID" \
--build-arg=USER_GID="$DOCKER_GID" \
. 1>&2

0 comments on commit b037fb2

Please sign in to comment.