Dockerfile参考demo(二)

基础镜像:搭建java环境和maven环境并设置时区等,注意构建的时候把文件名字更改成Dockerfile才能构建(没有后缀)

FROM openjdk:8-jdk-alpine

ADD settings.xml /usr/local/

WORKDIR /usr/local/

RUN wget http://apache-mirror.rbc.ru/pub/apache/maven/maven-3/3.6.1/binaries/apache-maven-3.6.1-bin.tar.gz  && \ 
    tar xzf apache-maven-3.6.1-bin.tar.gz  && \ 
    cp -R apache-maven-3.6.1 /usr/local/bin  && \ 
    export PATH=apache-maven-3.6.1/bin:$PATH  && \ 
    export PATH=/usr/local/bin/apache-maven-3.6.1/bin:$PATH  && \ 
    ln -s /usr/local/bin/apache-maven-3.6.1/bin/mvn /usr/local/bin/mvn  && \ 
    echo $PATH && \ 
    mkdir /root/.m2 && \
    cp -rf /usr/local/settings.xml /root/.m2/settings.xml  && \
    echo "http://mirrors.ustc.edu.cn/alpine/v3.5/main" > /etc/apk/repositories && \
    echo "http://mirrors.ustc.edu.cn/alpine/v3.5/community" >> /etc/apk/repositories && \
    apk update && \

    apk add ca-certificates && \
    apk add curl bash tree tzdata && \
    cp -rf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && \
    echo "Asia/Shanghai" > /etc/timezone && \
    apk del curl bash tree tzdata && \
    apk del ca-certificates && \
    date 

 这是maven的settings.xml的配置

<?xml version="1.0" encoding="UTF-8"?>

<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements.  See the NOTICE file
distributed with this work for additional information
regarding copyright ownership.  The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License.  You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied.  See the License for the
specific language governing permissions and limitations
under the License.
-->

<!--
 | This is the configuration file for Maven. It can be specified at two levels:
 |
 |  1. User Level. This settings.xml file provides configuration for a single user,
 |                 and is normally provided in ${user.home}/.m2/settings.xml.
 |
 |                 NOTE: This location can be overridden with the CLI option:
 |
 |                 -s /path/to/user/settings.xml
 |
 |  2. Global Level. This settings.xml file provides configuration for all Maven
 |                 users on a machine (assuming they're all using the same Maven
 |                 installation). It's normally provided in
 |                 ${maven.conf}/settings.xml.
 |
 |                 NOTE: This location can be overridden with the CLI option:
 |
 |                 -gs /path/to/global/settings.xml
 |
 | The sections in this sample file are intended to give you a running start at
 | getting the most out of your Maven installation. Where appropriate, the default
 | values (values used when the setting is not specified) are provided.
 |
 |-->
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
  <!-- localRepository
   | The path to the local repository maven will use to store artifacts.
   |
   | Default: ${user.home}/.m2/repository

  -->
  <localRepository>F:/MyRepository</localRepository>
  <!-- interactiveMode
   | This will determine whether maven prompts you when it needs input. If set to false,
   | maven will use a sensible default value, perhaps based on some other setting, for
   | the parameter in question.
   |
   | Default: true
  <interactiveMode>true</interactiveMode>
  -->

  <!-- offline
   | Determines whether maven should attempt to connect to the network when executing a build.
   | This will have an effect on artifact downloads, artifact deployment, and others.
   |
   | Default: false
  <offline>false</offline>
  -->

  <!-- pluginGroups
   | This is a list of additional group identifiers that will be searched when resolving plugins by their prefix, i.e.
   | when invoking a command line like "mvn prefix:goal". Maven will automatically add the group identifiers
   | "org.apache.maven.plugins" and "org.codehaus.mojo" if these are not already contained in the list.
   |-->
  <pluginGroups>
    <!-- pluginGroup
     | Specifies a further group identifier to use for plugin lookup.
    <pluginGroup>com.your.plugins</pluginGroup>
    -->
  </pluginGroups>

  <!-- proxies
   | This is a list of proxies which can be used on this machine to connect to the network.
   | Unless otherwise specified (by system property or command-line switch), the first proxy
   | specification in this list marked as active will be used.
   |-->
  <proxies>
    <!-- proxy
     | Specification for one proxy, to be used in connecting to the network.
     |
    <proxy>
      <id>optional</id>
      <active>true</active>
      <protocol>http</protocol>
      <username>proxyuser</username>
      <password>proxypass</password>
      <host>proxy.host.net</host>
      <port>80</port>
      <nonProxyHosts>local.net|some.host.com</nonProxyHosts>
    </proxy>
    -->
  </proxies>

  <!-- servers
   | This is a list of authentication profiles, keyed by the server-id used within the system.
   | Authentication profiles can be used whenever maven must make a connection to a remote server.
   |-->
  <servers>
    <!-- server
     | Specifies the authentication information to use when connecting to a particular server, identified by
     | a unique name within the system (referred to by the 'id' attribute below).
     |
     | NOTE: You should either specify username/password OR privateKey/passphrase, since these pairings are
     |       used together.
     |
    <server>
      <id>deploymentRepo</id>
      <username>repouser</username>
      <password>repopwd</password>
    </server>
    -->

    <!-- Another sample, using keys to authenticate.
    <server>
      <id>siteServer</id>
      <privateKey>/path/to/private/key</privateKey>
      <passphrase>optional; leave empty if not used.</passphrase>
    </server>
    -->
  </servers>

  <!-- mirrors
   | This is a list of mirrors to be used in downloading artifacts from remote repositories.
   |
   | It works like this: a POM may declare a repository to use in resolving certain artifacts.
   | However, this repository may have problems with heavy traffic at times, so people have mirrored
   | it to several places.
   |
   | That repository definition will have a unique id, so we can create a mirror reference for that
   | repository, to be used as an alternate download site. The mirror site will be the preferred
   | server for that repository.
   |-->
<mirrors>
    <mirror>
      <id>alimaven</id>
      <name>aliyun maven</name>
      <url>http://maven.aliyun.com/nexus/content/groups/public/</url>
      <mirrorOf>central</mirrorOf>        
    </mirror>
  </mirrors>

  <!-- profiles
   | This is a list of profiles which can be activated in a variety of ways, and which can modify
   | the build process. Profiles provided in the settings.xml are intended to provide local machine-
   | specific paths and repository locations which allow the build to work in the local environment.
   |
   | For example, if you have an integration testing plugin - like cactus - that needs to know where
   | your Tomcat instance is installed, you can provide a variable here such that the variable is
   | dereferenced during the build process to configure the cactus plugin.
   |
   | As noted above, profiles can be activated in a variety of ways. One way - the activeProfiles
   | section of this document (settings.xml) - will be discussed later. Another way essentially
   | relies on the detection of a system property, either matching a particular value for the property,
   | or merely testing its existence. Profiles can also be activated by JDK version prefix, where a
   | value of '1.4' might activate a profile when the build is executed on a JDK version of '1.4.2_07'.
   | Finally, the list of active profiles can be specified directly from the command line.
   |
   | NOTE: For profiles defined in the settings.xml, you are restricted to specifying only artifact
   |       repositories, plugin repositories, and free-form properties to be used as configuration
   |       variables for plugins in the POM.
   |
   |-->
  <profiles>
    <!-- profile
     | Specifies a set of introductions to the build process, to be activated using one or more of the
     | mechanisms described above. For inheritance purposes, and to activate profiles via <activatedProfiles/>
     | or the command line, profiles have to have an ID that is unique.
     |
     | An encouraged best practice for profile identification is to use a consistent naming convention
     | for profiles, such as 'env-dev', 'env-test', 'env-production', 'user-jdcasey', 'user-brett', etc.
     | This will make it more intuitive to understand what the set of introduced profiles is attempting
     | to accomplish, particularly when you only have a list of profile id's for debug.
     |
     | This profile example uses the JDK version to trigger activation, and provides a JDK-specific repo.
    <profile>
      <id>jdk-1.4</id>

      <activation>
        <jdk>1.4</jdk>
      </activation>

      <repositories>
        <repository>
          <id>jdk14</id>
          <name>Repository for JDK 1.4 builds</name>
          <url>http://www.myhost.com/maven/jdk14</url>
          <layout>default</layout>
          <snapshotPolicy>always</snapshotPolicy>
        </repository>
      </repositories>
    </profile>
    -->

    <!--
     | Here is another profile, activated by the system property 'target-env' with a value of 'dev',
     | which provides a specific path to the Tomcat instance. To use this, your plugin configuration
     | might hypothetically look like:
     |
     | ...
     | <plugin>
     |   <groupId>org.myco.myplugins</groupId>
     |   <artifactId>myplugin</artifactId>
     |
     |   <configuration>
     |     <tomcatLocation>${tomcatPath}</tomcatLocation>
     |   </configuration>
     | </plugin>
     | ...
     |
     | NOTE: If you just wanted to inject this configuration whenever someone set 'target-env' to
     |       anything, you could just leave off the <value/> inside the activation-property.
     |
    <profile>
      <id>env-dev</id>

      <activation>
        <property>
          <name>target-env</name>
          <value>dev</value>
        </property>
      </activation>

      <properties>
        <tomcatPath>/path/to/tomcat/instance</tomcatPath>
      </properties>
    </profile>
    -->
  </profiles>

  <!-- activeProfiles
   | List of profiles that are active for all builds.
   |
  <activeProfiles>
    <activeProfile>alwaysActiveProfile</activeProfile>
    <activeProfile>anotherAlwaysActiveProfile</activeProfile>
  </activeProfiles>
  -->
</settings>

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
### 回答1: Xilinx电路参考demo是由Xilinx公司开发的一种电路参考设计,旨在为客户提供实用的、可重用的电路设计方案。 这些电路参考demo大部分都是基于Xilinx FPGA技术,并以VHDL或Verilog代码形式提供。这些设计方案包含了常见的电路功能和模块,如数字信号处理、时钟管理、串行接口、以太网通信等。客户可以通过借鉴或直接使用这些电路参考demo,来加速自己的电路设计。 除了提供电路设计方案,Xilinx电路参考demo还提供了丰富的演示资料,包括设计思路、应用场景、性能测试等。客户可以通过这些资料轻松了解和掌握电路的工作原理和性能特点。 Xilinx电路参考demo的使用是免费的,并且Xilinx公司会不断更新和完善这些设计方案,以满足客户的不同需求。对于那些需要定制化的电路设计,Xilinx还提供了全面的技术支持和咨询服务,以确保客户能够获得最完美的电路方案。 总之,Xilinx电路参考demo是一种高效、实用的电路参考设计方案,可以帮助客户快速实现自己的电路设计,并提高设计的质量和性能。 ### 回答2: Xilinx是一家全球领先的可编程逻辑设备和电路设计解决方案供应商,在其产品展示中,经常提供众多电路参考demo以演示其产品的功能和应用。这些demo涵盖了广泛的领域,例如图像处理、信号转换、音频处理等等。 在许多Xilinx电路参考demo中都会包含FPGA芯片,这是一种基于可编程逻辑电路的半导体器件,具有高速、低功耗、高可靠性等特点,能够满足多种应用的要求。通过这些电路参考demo,用户可以了解到如何使用Xilinx的FPGA芯片来实现不同的功能,也可以了解到如何使用随附的开发工具套件来编写和测试代码。 电路参考demo的另一个重要作用是为用户提供了一些实际应用的示例,这些示例可能用于特定的行业、应用场景或特定的概念模型。用户可以根据这些示例来学习如何使用Xilinx的产品来解决实际问题,并且可以汲取这些示例中的技术和经验,从而快速构建出自己的项目。 总之,Xilinx电路参考demo对于想要学习FPGA芯片编程和Xilinx产品的应用示例的用户来说是非常可贵的。无论是初学者还是专业人士都可以从这些示例中汲取灵感、拓展思路、提升技能水平。 ### 回答3: Xilinx电路参考demo是一种基于FPGA的电路设计原型,它是由Xilinx公司提供的硬件开发平台,用于开发、设计和验证各种电路。该demo具有丰富的库,可充分利用FPGA器件的架构和性能,支持各种晶体管逻辑、射频、影像和信号处理、高速串行和XML应用等。通过使用Xilinx电路参考demo,可以加快您的电路开发速度,提高电路可靠性和性能,并减少设计周期和成本。 Xilinx电路参考demo包含了多种资源,包括基本逻辑和纯数字、通信和影像处理、存储器和接口等各种组件。这些组件可以通过手动连接线路或通过适当的软件工具进行自动布局和布线等处理来实现设计。 Xilinx电路参考demo还具有丰富的编程接口和开发工具,包括Vivado设计环境、Xilinx ISE、软件开发工具等,可以适应不同的编程语言和设计需求。通过这些工具和接口,开发人员可以快速掌握设计方案的细节,并对设计进行优化和调整。 总之,Xilinx电路参考demo是一种强大、灵活和可靠的硬件开发平台,为电路设计人员提供了实现高端电路的途径,具有丰富的资源和工具,可以有效地提高设计效率和质量,是电路设计中必不可少的工具之一。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值