-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathDockerfile
60 lines (50 loc) · 1.92 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#
# Dockerfile: http://github.com/airsim/metasim/tree/master/docker/centos/Dockerfile
# Docker Hub/Cloud page: https://cloud.docker.com/u/infrahelpers/repository/docker/infrahelpers/tvlsim
# Usual Docker tag: infrahelpers/tvlsim:centos
#
# Umbrella project for the Travel Market Simulator (TvlSim / AirSim)
#
# Base image:
# * Dockerfile: http://github.com/cpp-projects-showcase/docker-images/tree/master/centos8
# * Docker Hub/Cloud: https://cloud.docker.com/u/infrahelpers/repository/docker/infrahelpers/cpppython
# * Docker tag: infrahelpers/cpppython:centos8
#
FROM infrahelpers/cpppython:centos8
LABEL authors="Denis Arnaud <denis.arnaud_github at m4x dot org>"
# Docker build time environment variables
ENV container docker
ENV HOME /home/build
ENV LANGUAGE en_US:en
ENV LANG en_US.UTF-8
ENV LC_ALL $LANG
ENV SIM_DIR $HOME/dev/sim
# Switch to the `root` user for complementary installation and configuration
USER root
RUN dnf -y remove boost169-devel
RUN dnf -y install boost-devel boost-python3-devel
ADD resources/ssh-config $HOME/.ssh/config
RUN chown build.build $HOME/.ssh/config
# Switch to the `build` user
USER build
# Configure SSH
RUN ssh-keyscan github.com > $HOME/.ssh/known_hosts
RUN chmod 600 $HOME/.ssh/config $HOME/.ssh/known_hosts
# Prepare the build environment
RUN mkdir -p $SIM_DIR
WORKDIR $SIM_DIR
ADD resources/Rakefile resources/metasim.yaml.sample resources/fix-airinv-deprecated-error.patch resources/fix-tvlsim-deprecated-error.patch $SIM_DIR/
RUN mv $SIM_DIR/metasim.yaml.sample $SIM_DIR/metasim.yaml
# Build and deliver all the components
RUN rake checkout
RUN cd $SIM_DIR/workspace/src/airinv && \
patch -p1 < ../../../fix-airinv-deprecated-error.patch && \
cd $SIM_DIR
RUN cd $SIM_DIR/workspace/src/tvlsim && \
patch -p1 < ../../../fix-tvlsim-deprecated-error.patch && \
cd $SIM_DIR
RUN rake offline=true configure
RUN rake offline=true install
RUN rake offline=true dist
# Entry point
CMD ["/bin/bash"]