Browse Source

D/* remove techempower dependencies (#3498)

* work on d-lang:

* d-lang

* d-lang

* remove the d-lang.dockerfile

* fix vibed [ci fw-only D/vibed]
Nate 7 years ago
parent
commit
058829631d

+ 3 - 2
frameworks/D/collie/collie-ldc.dockerfile

@@ -1,6 +1,7 @@
-FROM techempower/d-lang:0.1
+FROM dlanguage/ldc:1.7.0
 
-COPY ./ ./
+ADD ./ /collie
+WORKDIR /collie
 
 RUN dub upgrade --verbose
 RUN dub build -f -b release --compiler=ldc2

+ 3 - 2
frameworks/D/collie/collie.dockerfile

@@ -1,6 +1,7 @@
-FROM techempower/d-lang:0.1
+FROM dlanguage/ldc:1.7.0
 
-COPY ./ ./
+ADD ./ /collie
+WORKDIR /collie
 
 RUN dub upgrade --verbose
 RUN dub build -f -b release

+ 3 - 2
frameworks/D/hunt/hunt.dockerfile

@@ -1,6 +1,7 @@
-FROM techempower/d-lang:0.1
+FROM dlanguage/ldc:1.7.0
 
-COPY ./ ./
+ADD ./ /hunt
+WORKDIR /hunt
 
 RUN dub upgrade --verbose
 

+ 1 - 1
frameworks/D/vibed/source/mongodb.d

@@ -43,7 +43,7 @@ class WebInterface {
 	this()
 	{
 		import std.process : environment;
-		auto db = connectMongoDB(environment.get("DBHOST", "127.0.0.1"));
+		auto db = connectMongoDB("tfb-database");
 		_worldCollection = db.getCollection("hello_world.world");
 		_fortuneCollection = db.getCollection("hello_world.fortune");
 

+ 1 - 1
frameworks/D/vibed/source/postgresql.d

@@ -182,7 +182,7 @@ struct FortuneResponse {
 static this()
 {
 	import std.process : environment;
-	auto connectionInfo = "host=" ~ environment.get("DBHOST", "127.0.0.1") ~ " port=5432 "
+	auto connectionInfo = "host=tfb-database port=5432 "
 						~ "dbname=hello_world  user=benchmarkdbuser password=benchmarkdbpass";
 	client = new PostgresClient(connectionInfo, poolSize);
 }

+ 4 - 3
frameworks/D/vibed/vibed-dmd-pgsql.dockerfile

@@ -1,8 +1,9 @@
-FROM techempower/d-lang:0.1
+FROM dlanguage/ldc:1.7.0
 
-COPY ./ ./
+ADD ./ /vibed
+WORKDIR /vibed
 
-RUN apt install -yqq libpq-dev zlib1g-dev
+RUN apt update -yqq && apt install -yqq libpq-dev zlib1g-dev
 
 RUN dub upgrade --verbose
 RUN dub build -b release --combined --config=postgresql

+ 4 - 3
frameworks/D/vibed/vibed-ldc-pgsql.dockerfile

@@ -1,8 +1,9 @@
-FROM techempower/d-lang:0.1
+FROM dlanguage/ldc:1.7.0
 
-COPY ./ ./
+ADD ./ /vibed
+WORKDIR /vibed
 
-RUN apt install -yqq libpq-dev zlib1g-dev
+RUN apt update -yqq && apt install -yqq libpq-dev zlib1g-dev
 
 RUN dub upgrade --verbose
 RUN dub build -b release --compiler=ldc2 --combined --config=postgresql

+ 4 - 3
frameworks/D/vibed/vibed-ldc.dockerfile

@@ -1,8 +1,9 @@
-FROM techempower/d-lang:0.1
+FROM dlanguage/ldc:1.7.0
 
-COPY ./ ./
+ADD ./ /vibed
+WORKDIR /vibed
 
-RUN apt install -yqq zlib1g-dev
+RUN apt update -yqq && apt install -yqq zlib1g-dev
 
 RUN dub upgrade --verbose
 RUN dub build -b release --compiler=ldc2 --combined --verbose

+ 5 - 2
frameworks/D/vibed/vibed.dockerfile

@@ -1,6 +1,9 @@
-FROM techempower/d-lang:0.1
+FROM dlanguage/ldc:1.7.0
 
-COPY ./ ./
+ADD ./ /vibed
+WORKDIR /vibed
+
+RUN apt update -yqq && apt install -yqq libpq-dev zlib1g-dev
 
 RUN dub upgrade --verbose
 RUN dub build -b release --combined

+ 0 - 28
toolset/setup/docker/languages/d-lang.dockerfile

@@ -1,28 +0,0 @@
-FROM techempower/base:0.1
-
-RUN apt install -yqq xdg-utils
-
-ENV DLANG=/dlang
-ENV DMDVER="2.078.1"
-ENV LDCVER="1.7.0"
-
-RUN mkdir -p $DLANG && \
-    wget http://downloads.dlang.org/releases/2.x/$DMDVER/dmd_$DMDVER-0_amd64.deb && \
-    dpkg-deb -x dmd_$DMDVER-0_amd64.deb $DLANG && \
-    cd $DLANG && \
-    wget https://github.com/ldc-developers/ldc/releases/download/v$LDCVER/ldc2-$LDCVER-linux-x86_64.tar.xz && \
-    tar xf ldc2-$LDCVER-linux-x86_64.tar.xz && \
-    ln -s $DLANG/ldc2-$LDCVER-linux-x86_64/bin/ldc2 $DLANG/usr/bin/ldc2
-
-# According to this file (dmd.conf) dmd will, upon execution, look for
-# a dmd.conf in 1) the current working directory [bad], 2) the directory
-# specified by the HOME environment variable [bad], 3) the directory in
-# which dmd resides [less bad], and 4) the /etc directory.
-# We are trying to maintain as little global presence as possible, so
-# we need to change the DFLAGS in the dmd.conf to be correctly sandboxed
-# to the $DLANG folder.
-RUN cp $DLANG/etc/dmd.conf $DLANG/usr/bin && \
-    sed -i "s|-I/usr/|-I${DLANG}/usr/|g" $DLANG/usr/bin/dmd.conf && \
-    sed -i "s|-L/usr/|-L${DLANG}/usr/|g" $DLANG/usr/bin/dmd.conf
-
-ENV PATH=${DLANG}/usr/bin:${PATH}