Skip to content

Commit 761f12e

Browse files
authored
Merge pull request #1 from alien4cloud/feature/docker-image
Added Dockerfile and hooks
2 parents b7c65fe + b7535fe commit 761f12e

3 files changed

Lines changed: 62 additions & 1 deletion

File tree

Dockerfile

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
FROM openjdk:8-alpine
2+
3+
ARG a4c_version=2.0.0
4+
5+
RUN apk add --update bash openssl curl python && \
6+
mkdir -p /var/a4c && \
7+
cd /var/a4c && \
8+
addgroup a4c && \
9+
adduser -D -s /bin/bash -h /var/a4c -g a4c -G a4c a4c && \
10+
umask 0022 && \
11+
curl -k -O https://fastconnect.org/maven/service/local/repositories/opensource/content/alien4cloud/alien4cloud-dist/${a4c_version}/alien4cloud-dist-${a4c_version}-dist.tar.gz && \
12+
tar xvf alien4cloud-dist-${a4c_version}-dist.tar.gz && \
13+
rm alien4cloud-dist-${a4c_version}-dist.tar.gz && \
14+
chown -R a4c:a4c /var/a4c && \
15+
rm -rf /var/cache/apk/*
16+
17+
EXPOSE 8088
18+
19+
USER a4c
20+
21+
ENTRYPOINT cd /var/a4c/alien4cloud && ./alien4cloud.sh
22+
23+
ARG BUILD_DATE
24+
ARG VCS_REF
25+
26+
LABEL org.label-schema.build-date=$BUILD_DATE \
27+
org.label-schema.vcs-url="https://github.com/alien4cloud/docker-alien4cloud.git" \
28+
org.label-schema.vcs-ref=$VCS_REF \
29+
org.label-schema.schema-version="1.0.0-rc1"

README.md

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,26 @@
11
# docker-alien4cloud
2-
Alien4Cloud Docker Image
2+
[Alien4Cloud](https://github.com/alien4cloud/alien4cloud) docker image.
3+
4+
[![](https://images.microbadger.com/badges/image/alien4cloud/alien4cloud.svg)](https://microbadger.com/images/alien4cloud/alien4cloud "Get your own image badge on microbadger.com") [![](https://images.microbadger.com/badges/version/alien4cloud/alien4cloud.svg)](https://microbadger.com/images/alien4cloud/alien4cloud "Get your own version badge on microbadger.com")
5+
6+
See https://alien4cloud.github.io for details on how ALIEN for Cloud
7+
(Application LIfecycle ENabler for cloud) can help you manage your application deployments.
8+
9+
Run this command to start Alien4Cloud :
10+
```
11+
docker run -d --name a4c -p 8088:8088 alien4cloud/alien4cloud
12+
```
13+
14+
You can then access the UI at http://_IPAddress_:8088 and login as _admin_/_admin_.
15+
16+
**Note**: if you are using a HTTP proxy that needs to be known by Alien4Cloud,
17+
for example if you need to import archives in Alien4cloud from an external web site,
18+
you can define this proxy in Alien4Cloud using the environment variable **JAVA_EXT_OPTIONS**.
19+
20+
So the docker command to run would be :
21+
```
22+
docker run -d --name a4c \
23+
-p 8088:8088 \
24+
-e JAVA_EXT_OPTIONS="-Dhttp.proxyHost=10.1.2.3 -Dhttp.proxyPort=8080 -Dhttp.nonProxyHosts=\"127.0.0.1|10.11.12.13|10.20.*\"" \
25+
alien4cloud/alien4cloud
26+
```

hooks/build

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/bin/bash
2+
3+
# $IMAGE_NAME var is injected into the build so the tag is correct.
4+
5+
echo "Build hook running"
6+
docker build --build-arg BUILD_DATE=`date -u +"%Y-%m-%dT%H:%M:%SZ"` \
7+
--build-arg VCS_REF=`git rev-parse --short HEAD` \
8+
-t $IMAGE_NAME .

0 commit comments

Comments
 (0)