Skip to content

Commit 26224f8

Browse files
Merge pull request #3 from UAVCAN/issue/2
Adding container for building LaTeX
2 parents 6c4b685 + f724076 commit 26224f8

3 files changed

Lines changed: 111 additions & 1 deletion

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
![UAVCAN](uavcan_logo.svg) UAVCAN Containerized Toolchains
22
===================
33

4-
This repository contains the Dockerfiles, instructions, and some utilities for building containers to be used as common toolchains for the UAVCAN project. These containers are published to the [uavcan organization on Docker Hub](https://cloud.docker.com/u/uavcan).
4+
This repository contains the Dockerfiles, instructions, and some utilities for building containers to be used as common toolchains for the UAVCAN project. These containers are published to the [uavcan organization on Docker Hub](https://cloud.docker.com/u/uavcan) and are used by the build automation for UAVCAN projects. You can use these same containers to get consistent build results in your local development environment.

texer/Dockerfile

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
#
2+
# Builds the c_cpp/ubuntu-16.04 toolchain container.
3+
#
4+
FROM ubuntu:16.04
5+
6+
VOLUME /repo
7+
8+
WORKDIR /repo
9+
10+
11+
ENV DEBIAN_FRONTEND=noninteractive
12+
13+
ENV LANG=en_US.UTF-8
14+
ENV LANGUAGE=en_US:en
15+
ENV LC_ALL=en_US.UTF-8
16+
17+
RUN apt-get update
18+
19+
# setup locales in the container so Python can default to utf-8.
20+
RUN apt-get -y install locales
21+
22+
# from http://jaredmarkell.com/docker-and-locales/
23+
RUN locale-gen en_US.UTF-8
24+
25+
RUN apt-get -y install software-properties-common
26+
RUN apt-get -y install apt-utils
27+
RUN apt-get -y install texlive-full
28+
RUN apt-get -y install lyx
29+
RUN apt-get -y install git
30+
31+
RUN add-apt-repository -y ppa:deadsnakes/ppa
32+
RUN apt-get update
33+
34+
RUN apt-get -y install python3.7
35+
RUN update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.7 999
36+
RUN apt-get -y install python3-pip
37+
RUN python3 -m pip install --upgrade pip
38+
39+
RUN python3 -m pip install pygments

texer/README.md

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
# Texer Docker
2+
3+
Builds and pushes a docker environment used by the UAVCAN project to build [LaTeX](https://www.latex-project.org/) documents.
4+
5+
## Build and Push
6+
7+
These instructions are for maintainers with permissions to push to the "uavcan" organization on Docker Hub.
8+
9+
```bash
10+
docker build .
11+
```
12+
13+
```bash
14+
docker images
15+
16+
REPOSITORY TAG IMAGE ID
17+
texer latest d7ab132649d6
18+
```
19+
20+
```bash
21+
docker tag d7ab132649d6 uavcan/texer:ubuntu-16.04
22+
docker login --username=yourhubusername
23+
docker push uavcan/texer:ubuntu-16.04
24+
```
25+
26+
## Testing out the container
27+
28+
Start an interactive session:
29+
30+
```bash
31+
docker run --rm -it -v ${PWD}:/repo uavcan/texer:ubuntu-16.04
32+
```
33+
34+
On macintosh you'll probably want to optimize osxfs with something like cached or delegated:
35+
36+
```bash
37+
docker run --rm -it -v ${PWD}:/repo:delegated uavcan/texer:ubuntu-16.04
38+
```
39+
40+
See ["Performance tuning for volume mounts"](https://docs.docker.com/docker-for-mac/osxfs-caching/) for details.
41+
42+
## Travis CI
43+
44+
You can use this in your .travis.yml like this:
45+
46+
```none
47+
services:
48+
- docker
49+
50+
before_install:
51+
- docker pull uavcan/texer:ubuntu-16.04
52+
53+
script:
54+
- docker run --rm -v $TRAVIS_BUILD_DIR:/repo uavcan/uavcan/texer:ubuntu-16.04 /bin/sh -c ./compile.sh
55+
56+
```
57+
58+
## BuildKite
59+
60+
Example pipeline.yml:
61+
62+
```yaml
63+
- label: ":github: my containerized build"
64+
command: "compile"
65+
plugins:
66+
- docker#v3.5.0:
67+
workdir: /repo
68+
image: "uavcan/texer:ubuntu-16.04"
69+
propagate-environment: true
70+
mount-ssh-agent: true
71+
```

0 commit comments

Comments
 (0)