Skip to content

Commit 5f6dfc3

Browse files
authored
tests(go): Docker for dev (#99)
1 parent a0a6d20 commit 5f6dfc3

2 files changed

Lines changed: 24 additions & 0 deletions

File tree

watcher-go/Dockerfile

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# syntax=docker/dockerfile:1
2+
FROM golang:latest
3+
4+
COPY .. /opt/watcher
5+
WORKDIR /opt/watcher
6+
7+
RUN apt-get update && \
8+
apt-get -y install cmake && \
9+
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release && \
10+
cmake --build build && \
11+
cmake --install build && \
12+
ldconfig
13+
14+
WORKDIR /usr/src/app

watcher-go/compose.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# `docker compose exec dev bash` to connect to the container
2+
services:
3+
dev:
4+
build:
5+
context: ..
6+
dockerfile: watcher-go/Dockerfile
7+
volumes:
8+
- ./:/usr/src/app
9+
command: [ "sleep", "infinity" ]
10+
restart: no

0 commit comments

Comments
 (0)