How to use the @nomiclabs/buidler-docker.BuidlerDocker.create function in @nomiclabs/buidler-docker

To help you get started, we’ve selected a few @nomiclabs/buidler-docker examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github nomiclabs / buidler / packages / buidler-vyper / src / compilation.ts View on Github external
export async function compile(vyperConfig: VyperConfig, paths: ProjectPaths) {
  const vyperVersion = vyperConfig.version;

  const dockerImage = {
    repository: VYPER_DOCKER_REPOSITORY,
    tag: vyperVersion
  };

  await validateDockerIsInstalled();

  const docker = await handleCommonErrors(BuidlerDocker.create());

  await handleCommonErrors(
    pullImageIfNecessary(docker, dockerImage, paths.cache)
  );

  const files = await getVyperSources(paths);

  let someContractFailed = false;

  for (const file of files) {
    const pathFromCWD = path.relative(process.cwd(), file);
    const pathFromSources = path.relative(paths.sources, file);

    if (await isAlreadyCompiled(file, paths, vyperVersion, files)) {
      console.log(pathFromCWD, "is already compiled");
      continue;

@nomiclabs/buidler-docker

A library to manage Docker from Buidler plugins

MIT
Latest version published 5 years ago

Package Health Score

70 / 100
Full package analysis