This repository has been archived by the owner on Jan 23, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
switched to a single RUN command with an optional 'GOVMOMI_CHECKOUT' ARG
- Loading branch information
1 parent
f871e58
commit 0e67c58
Showing
4 changed files
with
26 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
make.sh | ||
* | ||
!requirements.txt | ||
!flask_control.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,18 @@ | ||
FROM golang:1.10.1-alpine3.7 | ||
|
||
RUN apk add --no-cache build-base git linux-headers python python-dev py-pip py-setuptools | ||
ARG GOVMOMI_CHECKOUT=dee49fa3694c5aff05e4b340b0686772f65c1fe1 | ||
|
||
ADD requirements.txt /root/requirements.txt | ||
RUN pip install -r /root/requirements.txt | ||
ADD flask_control.py /root/flask_control.py | ||
|
||
RUN go get -d github.com/vmware/govmomi && \ | ||
RUN apk add --no-cache build-base git linux-headers python python-dev py-pip py-setuptools && \ | ||
pip install -r /root/requirements.txt && \ | ||
go get -d github.com/vmware/govmomi && \ | ||
cd ${GOPATH}/src/github.com/vmware/govmomi && \ | ||
git checkout dee49fa3694c5aff05e4b340b0686772f65c1fe1 && \ | ||
go install github.com/vmware/govmomi/govc github.com/vmware/govmomi/vcsim | ||
git checkout ${GOVMOMI_CHECKOUT} && \ | ||
go install github.com/vmware/govmomi/govc github.com/vmware/govmomi/vcsim && \ | ||
apk del build-base git linux-headers python-dev py-pip py-setuptools | ||
|
||
ADD flask_control.py /root/flask_control.py | ||
|
||
EXPOSE 5000 8989 443 80 8080 | ||
CMD ["/root/flask_control.py"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,16 @@ | ||
# vcenter-test-container | ||
vCenter simulator container for testing. | ||
|
||
## Usage ## | ||
|
||
### Building the image locally ### | ||
|
||
```bash | ||
docker image build -t local/ansible/vcenter-test-container:latest . | ||
``` | ||
|
||
### Building the image locally with a different version of govmomi checked out ### | ||
|
||
```bash | ||
docker image build --build-arg GOVMOMI_CHECKOUT=<hash|branch|tag> -t local/ansible/vcenter-test-container:<hash|branch|tag> . | ||
``` |