public void pop() {
    Preconditions.checkState(!stack.isEmpty(), "Error in file properties stack pop, popping at 0");
    stack.remove(stack.size() - 1);
    updateProperties();
  }
Remove the last layer from the stack. All values are recalculated.
jib-cli/src/main/java/com/google/cloud/tools/jib/cli/buildfile/FilePropertiesStack.java