Skip to content

Commit 3d1d47a

Browse files
committed
Initial commit
0 parents  commit 3d1d47a

File tree

5 files changed

+74
-0
lines changed

5 files changed

+74
-0
lines changed

.env

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
COMPOSE_PROJECT_NAME=clear

.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.idea
2+
docker
3+
docker.iml

Dockerfile

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# https://hub.docker.com/r/adoptopenjdk/openjdk11
2+
FROM openjdk:17-alpine
3+
4+
LABEL maintainer="[email protected]"
5+
6+
RUN set -x \
7+
&& apk --update add --no-cache --virtual .build-deps curl \
8+
&& SBT_VER="1.8.2" \
9+
&& ESUM="1f65344da074dbd66dfefa93c0eff8d319d772e5cad47fcbeb6ae178bbdf4686" \
10+
&& SBT_URL="https://github.com/sbt/sbt/releases/download/v${SBT_VER}/sbt-${SBT_VER}.tgz" \
11+
&& apk add shadow \
12+
&& apk add bash \
13+
&& apk add openssh \
14+
&& apk add rsync \
15+
&& apk add git \
16+
&& curl -Ls ${SBT_URL} > /tmp/sbt-${SBT_VER}.tgz \
17+
&& sha256sum /tmp/sbt-${SBT_VER}.tgz \
18+
&& (echo "${ESUM} /tmp/sbt-${SBT_VER}.tgz" | sha256sum -c -) \
19+
&& mkdir /opt/sbt \
20+
&& tar -zxf /tmp/sbt-${SBT_VER}.tgz -C /opt/sbt \
21+
&& sed -i -r 's#run \"\$\@\"#unset JAVA_TOOL_OPTIONS\nrun \"\$\@\"#g' /opt/sbt/sbt/bin/sbt \
22+
&& apk del --purge .build-deps \
23+
&& rm -rf /tmp/sbt-${SBT_VER}.tgz /var/cache/apk/*
24+
25+
WORKDIR /opt/workspace
26+
27+
ENTRYPOINT ["sbt"]
28+
29+
ENV PATH="/opt/sbt/sbt/bin:$PATH" \
30+
JAVA_OPTS="-XX:+UseContainerSupport -Dfile.encoding=UTF-8" \
31+
SBT_OPTS="-Xmx2048M -Xss2M"
32+
33+
RUN set -x \
34+
&& echo "ThisBuild / scalaVersion := \"2.12.17\"" >> build.sbt \
35+
&& mkdir -p project \
36+
&& echo "sbt.version=1.8.2" >> project/build.properties \
37+
&& echo "object Test" >> Test.scala \
38+
&& sbt compile \
39+
&& sbt compile \
40+
&& rm Test.scala \
41+
&& rm -rf project \
42+
&& rm -rf target \
43+
&& rm build.sbt

README.md

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Installation
2+
3+
- Install docker on local based on your respective OS. For error related to `pass` package, follow https://www.devmanuals.net/install/ubuntu/ubuntu-12-04-lts-precise-pangolin/install-pass.html
4+
-

tools.yml

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
version: "3.9"
2+
services:
3+
mysql:
4+
image: mysql:5.7
5+
container_name: ${COMPOSE_PROJECT_NAME}_mysql
6+
# NOTE: use of "mysql_native_password" is not recommended: https://dev.mysql.com/doc/refman/8.0/en/upgrading-from-previous-series.html#upgrade-caching-sha2-password
7+
# (this is just an example, not intended to be a production configuration)
8+
command: --default-authentication-plugin=mysql_native_password
9+
restart: always
10+
ports:
11+
- "3306:3306"
12+
volumes:
13+
- ./docker/mysql/data:/var/lib/mysql
14+
environment:
15+
MYSQL_ROOT_PASSWORD: root
16+
redis:
17+
image: "redis" # Use a public Redis image to build the redis service
18+
container_name: ${COMPOSE_PROJECT_NAME}_redis
19+
restart: unless-stopped
20+
ports:
21+
- "6379:6379"
22+
volumes:
23+
- ./docker/redis_local:/data

0 commit comments

Comments
 (0)