Commit 0ee41e34 authored by Stéphane Glondu's avatar Stéphane Glondu Committed by Stephane Glondu

Dockerfiles: use directly and avoid sudo

parent f69589e9
FROM ocaml/opam2:debian-9-ocaml-4.06
RUN sudo apt-get update -qq && sudo apt-get install -y -qq build-essential libgmp-dev libpcre3-dev pkg-config m4 libssl-dev libsqlite3-dev wget ca-certificates unzip aspcud libncurses-dev uuid-runtime zlib1g-dev
# The following line is copy-pasted from the opam install command that is written in ./
RUN opam install --yes atdgen zarith cryptokit uuidm calendar cmdliner sqlite3 ssl=0.5.5 eliom=6.3.0 csv
\ No newline at end of file
FROM debian:9
RUN apt-get update -qq && apt-get upgrade -qq && apt-get install -qq bubblewrap build-essential libgmp-dev libpcre3-dev pkg-config m4 libssl-dev libsqlite3-dev wget ca-certificates zip unzip aspcud libncurses-dev uuid-runtime zlib1g-dev libgd-securityimage-perl cracklib-runtime git
RUN useradd --create-home belenios
COPY /home/belenios
USER belenios
WORKDIR /home/belenios
RUN ./
# Docker image used as FROM has been generated from ./Dockerfile_base_environment
FROM swergas/beleniosbase:b97ee7e11a9f06ae15862e2210a10567f84f8a65d727262b8a5f0c513f9be5b6
FROM glondu/beleniosbase:20181206-1
USER root
# Install firefox-esr (The firefox package is not present in apt repositories of this linux image, so we use firefox-esr)
RUN sudo apt-get install -y -qq firefox-esr
RUN apt-get install -y -qq firefox-esr
# Install geckodriver (It is needed by selenium to run firefox)
RUN wget --no-verbose -O /tmp/geckodriver.tar.gz$GECKODRIVER_VERSION/geckodriver-v$GECKODRIVER_VERSION-linux64.tar.gz && rm -rf /opt/geckodriver && sudo tar -C /opt -zxf /tmp/geckodriver.tar.gz && rm /tmp/geckodriver.tar.gz && sudo mv /opt/geckodriver /opt/geckodriver-$GECKODRIVER_VERSION && sudo chmod 755 /opt/geckodriver-$GECKODRIVER_VERSION && sudo ln -fs /opt/geckodriver-$GECKODRIVER_VERSION /usr/bin/geckodriver
RUN wget --no-verbose -O /tmp/geckodriver.tar.gz$GECKODRIVER_VERSION/geckodriver-v$GECKODRIVER_VERSION-linux64.tar.gz && rm -rf /opt/geckodriver && tar -C /opt -zxf /tmp/geckodriver.tar.gz && rm /tmp/geckodriver.tar.gz && mv /opt/geckodriver /opt/geckodriver-$GECKODRIVER_VERSION && chmod 755 /opt/geckodriver-$GECKODRIVER_VERSION && ln -fs /opt/geckodriver-$GECKODRIVER_VERSION /usr/bin/geckodriver
# Install packages required to run the test scenario
RUN sudo apt-get install -y -qq python3 python3-venv
RUN apt-get install -y -qq python3 python3-venv
USER belenios
......@@ -53,9 +53,9 @@ gitlab-runner exec docker build_and_run_automated_test_scenario_1_with_preinstal
Note: The Docker image has been built and pushed to Docker Hub using the following commands:
sha256sum ./ # This outputs the checksum that you can use as docker image name
docker build -t swergas/beleniosbase:b97ee7e11a9f06ae15862e2210a10567f84f8a65d727262b8a5f0c513f9be5b6_test_scenario_environment - < ./Dockerfile_test_scenario_environment
sudo docker push swergas/beleniosbase:b97ee7e11a9f06ae15862e2210a10567f84f8a65d727262b8a5f0c513f9be5b6_test_scenario_environment
docker build -t glondu/beleniosbase:20181206-1 -f Dockerfile_base_environment .
docker build -t glondu/beleniosbase-tests:20181206-1 -f Dockerfile_test_scenario_environment .
sudo docker push glondu/beleniosbase-tests:20181206-1
We use `YYYYMMDD-N` for docker-tagging, where `YYYYMMDD` is the build date, and `N` is a sequence number.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment