Skip to content

Commit de71f5f

Browse files
author
Miguel Molina
committed
native: improve the way to get node kinds
1 parent cd5584b commit de71f5f

File tree

6 files changed

+98
-350
lines changed

6 files changed

+98
-350
lines changed

Dockerfile.build.tpl

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Dockerfile.build represents the build environment of the driver, used during
2+
# the development phase to test and in CI to build and test.
3+
4+
# The prefered base image is the lastest stable Alpine image, if alpine doesn't
5+
# meet the requirements you can switch the from to the latest stable slim
6+
# version of Debian (eg.: `debian:jessie-slim`).
7+
FROM alpine:3.5
8+
9+
# To avoid files written in the volume by root or foreign users, we create a
10+
# container local user with the same UID of the user executing the build.
11+
# The following commands are defined to use in busybox based distributions,
12+
# if you are using a standard distributions, replace the `adduser` command with:
13+
# `useradd --uid ${BUILD_UID} --home /opt/driver ${BUILD_USER}`
14+
RUN mkdir -p /opt/driver/src && \
15+
adduser ${BUILD_USER} -u ${BUILD_UID} -D -h /opt/driver/src
16+
17+
18+
# As minimal build tools you need: make, curl and git, install using the same
19+
# command the specific tools required to build the driver.
20+
RUN apk add --no-cache make git curl ca-certificates
21+
22+
23+
# The volume with the full source code is mounted at `/opt/driver/src` so, we
24+
# set the workdir to this path.
25+
WORKDIR /opt/driver/src

Dockerfile.tpl

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Dockerfile represents the container being use to run the driver, should be
2+
# small as possible containing strictly only the tools required to run the
3+
# driver.
4+
5+
# The prefered base image is the lastest stable Alpine image, if alpine doesn't
6+
# meet the requirements you can switch the from to the latest stable slim
7+
# version of Debian (eg.: `debian:jessie-slim`). If the excution environment
8+
# is equals to the build environment the build image can be use as FROM:
9+
# bblfsh/<language>-driver-build
10+
FROM alpine:3.5
11+
12+
CMD /opt/driver/bin/driver

README.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ To initialize the build system execute: `bblfsh-sdk prepare-build`, at the root
1515
To execute the tests just execute `make test`, this will execute the test over the native and the go components of the driver. Use `make test-native` to run the test only over the native component or `make test-driver` to run the test just over the go component.
1616

1717
The build is done executing `make build`. To evaluate the result, a docker container, execute:
18-
`docker run -it bblfsh/java-driver:dev-<commit[:6]>`
18+
`docker run -it bblfsh/typescript-driver:dev-<commit[:6]>`
1919

2020

2121
License
@@ -24,3 +24,4 @@ License
2424
GPLv3, see [LICENSE](LICENSE)
2525

2626

27+

native/Dockerfile

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
FROM node:6.10-alpine
2+
3+
RUN mkdir -p /opt/node
4+
ADD . /opt/node
5+
6+
WORKDIR /opt/node
7+
RUN yarn install
8+
9+
CMD node /opt/node/src/index.js
10+

0 commit comments

Comments
 (0)