mirror of
https://github.com/clearlinux/dockerfiles.git
synced 2026-08-19 12:16:37 +00:00
committed by
George T Kramer
parent
08d1c74bbf
commit
8848dd8b0d
@@ -19,6 +19,7 @@ env:
|
||||
- DOCKERFILE_DIR=mixer-ci
|
||||
- DOCKERFILE_DIR=nginx
|
||||
- DOCKERFILE_DIR=node
|
||||
- DOCKERFILE_DIR=openjdk
|
||||
- DOCKERFILE_DIR=php
|
||||
- DOCKERFILE_DIR=postgres
|
||||
- DOCKERFILE_DIR=python
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
FROM clearlinux:latest
|
||||
MAINTAINER long1.wang@intel.com
|
||||
|
||||
ARG swupd_args
|
||||
|
||||
RUN swupd update --no-boot-update $swupd_args && \
|
||||
swupd bundle-add java-runtime $swupd_args && \
|
||||
rm -rf /var/lib/swupd
|
||||
|
||||
CMD ["java"]
|
||||
@@ -0,0 +1,37 @@
|
||||
openjdk
|
||||
==========
|
||||
This provides a Clear Linux* openjdk container
|
||||
|
||||
Build
|
||||
-----
|
||||
```
|
||||
docker build -t clearlinux/openjdk .
|
||||
```
|
||||
|
||||
Or just pull it from Dockerhub
|
||||
---------------------------
|
||||
```
|
||||
docker pull clearlinux/openjdk
|
||||
```
|
||||
|
||||
Compile your java app inside the Docker container
|
||||
-----------------------
|
||||
```
|
||||
docker run --rm -it --name myapp -v "$PWD":/usr/src/myapp -w /usr/src/myapp clearlinux/openjdk javac myapp.java
|
||||
```
|
||||
|
||||
Run your java app instance
|
||||
-----------------------
|
||||
```
|
||||
docker run --rm -it --name myapp -v "$PWD":/usr/src/myapp -w /usr/src/myapp clearlinux/openjdk java myapp
|
||||
```
|
||||
|
||||
Details of how-to
|
||||
---------------------
|
||||
- Please refer to the docker official openjdk image [page](https://hub.docker.com/_/openjdk).
|
||||
|
||||
Extra Build ARGs
|
||||
----------------
|
||||
- ``swupd_args`` Specifies [SWUPD](https://github.com/clearlinux/swupd-client/blob/master/docs/swupd.1.rst#options) flags
|
||||
|
||||
Default build args in Docker are on: https://docs.docker.com/engine/reference/builder/#arg
|
||||
Reference in New Issue
Block a user