How to upgrade rest API in docker? - docker

I have following docker engine and API version.
{
"ApiVersion": "1.17",
"Arch": "amd64",
"GitCommit": "a8a31ef",
"GoVersion": "go1.3.3",
"KernelVersion": "3.19.0-30-generic",
"Os": "linux",
"Version": "1.5.0"
}
It shows the Engine version as 1.5.0 but the API version as 1.17. How should I upgrade the API to version 1.21?
I am using ubuntu 15.04.
Thanks.

https://docs.docker.com/installation/ubuntulinux/#installation
API version 1.21 is not released yet, but you can upgrade to 1.20 by following the steps at that url

Related

Mismatch in OSversion and other properties for Aspnet image on AppVeyor

I am facing a very peculiar issue. I am using AppVeyor for my CI/CD and apparently the OS version of mcr.microsoft.com/dotnet/framework/aspnet:4.8 image is different on AppVeyor server and on my system.
This is what I get when I inspect the image on AppVeyor
"Architecture": "amd64",
"Os": "windows",
"OsVersion": "10.0.17763.1637",
"Size": 8424507509,
"VirtualSize": 8424507509,
"GraphDriver": {
"Data": {
"dir": "C:\\ProgramData\\Docker\\windowsfilter\\299141c3a9068896ce9f5928d7b9174570a2ef0b5f59a9b45ca0d768c3a09206"
},
"Name": "windowsfilter"
},
as compared to this, which is what I have on my system
"Architecture": "amd64",
"Os": "windows",
"OsVersion": "10.0.19041.685",
"Size": 5541468778,
"VirtualSize": 5541468778,
"GraphDriver": {
"Data": {
"dir": "C:\\ProgramData\\Docker\\windowsfilter\\c9c52e1316159499618a9c15b326fdc7457db4f4de07af590039086de5bc82e0"
},
"Name": "windowsfilter"
},
There is a difference between OS version and other properties. So I tried pulling the images again on the basis of digest
docker pull mcr.microsoft.com/dotnet/framework/aspnet#sha256:d7adec80a9a43d801891458040018972ac006aeca2903cdc6369f69f54951b22
but nothing gets updated.
The problem this is causing is that I have custom image that gets build on my system that has an OSversion "OsVersion": "10.0.19041.685". This image is used by Appveyor to build my final image, and as expected this throws an error as explained in Microsoft Container Versions.
Can anyone help me understand why that's happening.Thanks!
AppVeyor image is based on Windows Server 2019, so 10.0.17763 is the latest version of base image that can be run on AppVeyor. You are on Windows 10 version 2004 which is build 10.0.19041.

How to use electron-builder with target portable?

I am trying to generate a exe file with electron-builder not an installer so I am trying by setting the target to portable
{
"name": "hello-world",
"version": "1.0.0",
"description": "a hello world",
"main": "index.js",
"scripts": {
"start": "electron .",
"dist": "build"
},
"author": "KR",
"license": "ISC",
"devDependencies": {
"electron": "^4.1.4",
"electron-builder": "^20.39.0"
},
"build":{
"appId": "com.whatever.helloworld",
"win":{
"target": ["portable"],
"icon" : "build/icon.ico"
}
}
}
However when I try npm run dist I get
Configuring yargs through package.json is deprecated and will be removed in the next major release, please use the JS API instead.
Configuring yargs through package.json is deprecated and will be removed in the next major release, please use the JS API instead.
• electron-builder version=20.39.0
• loaded configuration file=package.json ("build" field)
• writing effective config file=dist\builder-effective-config.yaml
• no native production dependencies
• packaging platform=win32 arch=x64 electron=4.1.4 appOutDir=dist\win-unpacked
• default Electron icon is used reason=application icon is not set
• building target=portable file=dist\hello-world 1.0.0.exe archs=x64
and the program is stuck for ever. When I break it(ctrl-c), it says
Error: Exit code: 255. Command failed: D:\electrontest\hello-world\node_modules\7zip-bin\win\x64\7za.exe a -bd -mx=9 -mtc=off -mtm=off -mta=off D:\electrontest\hello-world\dist\hello-world-1.0.0-x64.nsis.7z .
So I guess the program is stuck in 7za compression.
I searched and there is no example of using electron-builder with portable only few with nsis. (I have another question but first I would like to run the basics).
use electron-builder from 1
then in package.json use in scripts:
"dist": "electron-builder --win=portable",

Can not install older version of Electron through package.json

Since the current VS code doesn't support Electron v1.6, so I have to downgrade my Electron version. However, I found that I can not install the old version of Electron by giving the version number in the package.json file. The following is my configuration:
{
"name": "Example",
"version": "1.0.0",
"description": "",
"main": "./app/main.js",
"scripts": {
"postinstall": "install-app-deps",
"start": "electron ."
},
"keywords": [],
"author": "",
"license": "ISC",
"devDependencies": {
"electron-builder": "^15.5.1",
"electron": "^1.4",
"electron-rebuild": "^1.5.7"
},
"dependencies": {
"jquery": "^3.1.1",
"sqlite3": "^3.1.8"
}
}
The output of the npm install is the following:
And I run the following command to check the version of Electron:
node_modules/.bin/electron -v
and the output is '1.6.2' which is the latest version of Electron.
What's more interesting is that I can install the old version of Electron successfully by directly running the following command:
npm install electron#1.4
So I want to if there is anything wrong in my package.json file which caused this problem. And if so, how can I fix it.
Actually, the Electron version 1.6 satisfies "^1.4" because the caret tells NPM the minimal version of the package to install.
As also written in an answer to the Microsoft issue on GitHub, you might use "1.4" or "~1.4.0" in order to get Electron 1.4 or any other 1.4.x version (the tilde is for minimal minor releases as shown in the NPM documentation for the cli-based update of packages).

Artifact Version Search API Call in Groovy

I'm trying to integrate below's REST API call into Groovy and use Jenkin's Dynamic Parameter to list all the versions of the artifact. Please could you assist with the groovy script
The Artifactory version search REST API method can be used to get a list of all available artifact versions by GroupId and ArtifactId in local, remote or virtual repositories.
For example:
GET /api/search/versions?g=org.acme&a=artifact&repos=libs-release-local
{
"results": [
{
"version": "1.2",
"integration": false
},{
"version": "1.0-SNAPSHOT",
"integration": true
},{
"version": "1.0",
"integration": false
}
]
}

How to get the Docker version using the Remote API

Is it possible to get the Docker service version using the Remote API, that is, something similar to passing the version parameter to the command line client?
docker --version
Yes; it's the /version endpoint.
From the docs:
Example request:
GET /version HTTP/1.1
Example response:
HTTP/1.1 200 OK
Content-Type: application/json
{
"Version": "1.5.0",
"Os": "linux",
"KernelVersion": "3.18.5-tinycore64",
"GoVersion": "go1.4.1",
"GitCommit": "a8a31ef",
"Arch": "amd64",
"ApiVersion": "1.20",
"Experimental": false
}

Resources