Commit 2511d7c4 authored by Mathieu Valois's avatar Mathieu Valois
Browse files

fix Dockerfile

parent 9d2a9c7d
Loading
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -13,7 +13,7 @@ set(EXECUTABLE_OUTPUT_PATH bin/${CMAKE_BUILD_TYPE})
set(CMAKE_CXX_FLAGS "-pedantic -Wall -std=c++11 -Wextra -O3")
set(CMAKE_LD_FLAGS "-lpthread")

ADD_EXECUTABLE(cppack src/core/statsgen.cpp src/cli/main.cpp)
add_executable(cppack src/core/statsgen.cpp src/cli/main.cpp)
target_link_libraries(cppack ${CMAKE_THREAD_LIBS_INIT})

# Création des exécutables.
@@ -40,7 +40,7 @@ if(Qt5Core_FOUND)
	    src/core/statsgen.cpp
	)

	target_link_libraries(cppack-gui Qt5::Core Qt5::Widgets Qt5::Charts ${CMAKE_THREAD_LIBS_INIT})
	target_link_libraries(cppack-gui Qt5::Core Qt5::Gui Qt5::Widgets Qt5::Charts ${CMAKE_THREAD_LIBS_INIT})
else()
	message(STATUS "Qt5 not found. Not building GUI.")
endif()
 No newline at end of file
+3 −2
Original line number Diff line number Diff line
# docker build . -t cppack
# docker run -d --name gsg -p 5022:22 cppack
# ssh -X -p 5022 root@127.0.0.1 /opt/cppack/cppack-gui
# ssh -X -p 5022 root@127.0.0.1 /opt/cppack/bin/cppack-gui
FROM ubuntu:bionic

ENV SSH_PASSWORD "rootpass"
@@ -8,6 +8,7 @@ ENV SSH_PASSWORD "rootpass"
RUN apt-get -qq update
RUN apt-get -qq -y install \
	build-essential \
	cmake \
	qt5-default \
	libqt5charts5-dev \
	supervisor \
@@ -31,7 +32,7 @@ RUN mkdir -p /var/log/supervisor && \
COPY . /opt/cppack

WORKDIR /opt/cppack
RUN make -s
RUN cmake . && make -s

CMD [ "/usr/bin/supervisord", "-c",  "/etc/supervisor/conf.d/supervisord.conf" ]