从Docker 1.08升级到1.10

时间:2016-10-21 14:32:47

标签: docker

我需要将当前的Docker版本1.8.2-fc22升级到1.10.0或更高版本。 从我执行的Docker文档:

import java.io.File;
import java.io.IOException;
import java.util.logging.Level;
import java.util.logging.Logger;
import javafx.application.Application;
import javafx.collections.FXCollections;
import javafx.collections.ObservableList;
import javafx.embed.swing.SwingFXUtils;
import javafx.scene.Scene;
import javafx.stage.Stage;
import javafx.scene.chart.*;
import javafx.scene.Group;
import javafx.scene.image.WritableImage;
import javax.imageio.ImageIO;

public class PieChartSample extends Application {

    private static String[] arguments; 

    @Override public void start(Stage stage) {
        Scene scene = new Scene(new Group());
        stage.setTitle("Imported Fruits");
        stage.setWidth(500);
        stage.setHeight(500);

        ObservableList<PieChart.Data> pieChartData = FXCollections.observableArrayList();

//               
        final PieChart chart = new PieChart(pieChartData);
        chart.setTitle("Imported Fruits");
        for(int i = 0; i < arguments.length; i+=2)
        {
            System.out.println(arguments[i] + " " + arguments[i+1]);
            chart.getData().add(new PieChart.Data(arguments[i], Double.parseDouble(arguments[i+1])));
        }

        ((Group) scene.getRoot()).getChildren().add(chart);

        saveAsPng(scene);
        System.out.println("Done!");
        System.exit(0);
        //stage.setScene(scene);
        //stage.show();
    }

    public static void main(String[] args) {
        arguments = args;
        launch(args);
    }

    static void saveAsPng(Scene scene){
        try 
        {
            WritableImage image = scene.snapshot(null);

            File file = new File("tempPieChart.png");

            ImageIO.write(SwingFXUtils.fromFXImage(image, null), "png", file);
        } 
        catch (IOException ex) 
        {
            Logger.getLogger(PieChartSample.class.getName()).log(Level.SEVERE, null, ex);
        }

    }
}

输出结果为:

[root@localhost ~]# docker run --rm -v /var/lib/docker:/var/lib/docker docker/v1.10-migrator

有任何帮助吗?我应该先更新我的Fedora(21)吗? 我的系统规格: Linux localhost.localdomain 4.4.14-200.fc22.x86_64 + debug#1 SMP Fri Jun 24 21:06:28 UTC 2016 x86_64 x86_64 x86_64 GNU / Linux

0 个答案:

没有答案