diff options
author | Ethan Lynn <ethanlynnl@vmware.com> | 2019-04-09 14:21:46 +0800 |
---|---|---|
committer | Ethan Lynn <ethanlynnl@vmware.com> | 2019-04-09 14:22:41 +0800 |
commit | 9e7dbb68475dcc39e051dc14df91ed255088c4a5 (patch) | |
tree | a386367b6fa2ed5edc82ac8117fe03ee645ed424 /vesagent | |
parent | 37b43aa2b44de7c5b99eaa857d2d4d8b25106c06 (diff) |
Use alpine for MultiCloud VIO vesagent
This patch change VIO vesagent to use python:2-alpine as docker
base image.
Change-Id: I2ff6ce2cbc82de51a55dd020f43e478a54d9d6b1
Issue-ID: MULTICLOUD-537
Signed-off-by: Ethan Lynn <ethanlynnl@vmware.com>
Diffstat (limited to 'vesagent')
-rw-r--r-- | vesagent/docker/Dockerfile | 23 | ||||
-rwxr-xr-x | vesagent/docker/opt/start-manager.sh | 2 |
2 files changed, 8 insertions, 17 deletions
diff --git a/vesagent/docker/Dockerfile b/vesagent/docker/Dockerfile index 290333b..0d8c106 100644 --- a/vesagent/docker/Dockerfile +++ b/vesagent/docker/Dockerfile @@ -1,30 +1,21 @@ # Use an official Python runtime as a parent image -FROM python:2.7.14 +FROM python:2-alpine # Make port <Port Num> available to the world outside this container #EXPOSE <Port Num> -RUN echo "deb http://http.debian.net/debian jessie-backports main" > /etc/apt/sources.list.d/jessie-backports.list && \ - apt-get update && \ - apt-get install -y vim && \ - apt-get install -y zip && \ - apt-get install -y unzip && \ - apt-get install -y curl && \ - apt-get install -y wget && \ - apt-get install -y -t jessie-backports openjdk-8-jre-headless ca-certificates-java - # Set the working directory to /opt WORKDIR /opt # Copy the local opt directory contents into the container at /opt ADD opt /opt -#Download vesagent jar from nexus repo and place in /opt -RUN cd /opt/ && \ - wget -O /opt/vesagent-1.0.0.jar 'https://nexus.onap.org/service/local/artifact/maven/redirect?r=snapshots&g=org.onap.multicloud.openstack.vmware&a=vesagent&v=LATEST&e=jar' - -# Install any needed packages specified in requirements.txt -RUN pip install -r requirements.txt +RUN apk update && \ + apk add zip unzip curl wget openjdk8 && \ + cd /opt/ && \ + wget -O /opt/vesagent-1.0.0.jar 'https://nexus.onap.org/service/local/artifact/maven/redirect?r=snapshots&g=org.onap.multicloud.openstack.vmware&a=vesagent&v=LATEST&e=jar' && \ + pip install -r requirements.txt && \ + apk del zip unzip # Run application when the container launches CMD [ "/opt/start-manager.sh" ] diff --git a/vesagent/docker/opt/start-manager.sh b/vesagent/docker/opt/start-manager.sh index e70dc19..0c6f09b 100755 --- a/vesagent/docker/opt/start-manager.sh +++ b/vesagent/docker/opt/start-manager.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh # Copyright (c) 2017-2018 VMware, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); |