-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 85b84e5
Showing
6 changed files
with
188 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
--- | ||
name: docker | ||
concurrency: | ||
group: ${{ github.ref }} | ||
cancel-in-progress: true | ||
on: | ||
push: | ||
pull_request: | ||
jobs: | ||
docker: | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- run: docker build . -t home | ||
- run: docker run --rm home echo Hello |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- | ||
name: hadolint | ||
on: | ||
push: | ||
pull_request: | ||
jobs: | ||
hadolint: | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- uses: actions/checkout@master | ||
- uses: hadolint/[email protected] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Dockerfile.log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,134 @@ | ||
# The MIT License (MIT) | ||
# | ||
# Copyright (c) 2024 Aliaksei Bialiauski | ||
# | ||
# Permission is hereby granted, free of charge, to any person obtaining a copy | ||
# of this software and associated documentation files (the "Software"), to deal | ||
# in the Software without restriction, including without limitation the rights | ||
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
# copies of the Software, and to permit persons to whom the Software is | ||
# furnished to do so, subject to the following conditions: | ||
# | ||
# The above copyright notice and this permission notice shall be included | ||
# in all copies or substantial portions of the Software. | ||
# | ||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE | ||
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
# SOFTWARE. | ||
|
||
FROM ubuntu:22.04 | ||
LABEL Description="Lightweight image with Rust for Rultor.com" Version="0.0.0" | ||
WORKDIR /tmp | ||
|
||
ENV DEBIAN_FRONTEND=noninteractive | ||
|
||
# To disable IPv6 | ||
RUN mkdir ~/.gnupg \ | ||
&& printf "disable-ipv6" >> ~/.gnupg/dirmngr.conf | ||
|
||
# UTF-8 locale | ||
RUN apt-get clean \ | ||
Check failure on line 34 in Dockerfile GitHub Actions / hadolint
Check failure on line 34 in Dockerfile GitHub Actions / hadolint
Check failure on line 34 in Dockerfile GitHub Actions / hadolint
|
||
&& apt-get update -y --fix-missing \ | ||
&& apt-get -y install locales \ | ||
&& locale-gen en_US.UTF-8 \ | ||
&& dpkg-reconfigure locales \ | ||
&& echo "LC_ALL=en_US.UTF-8\nLANG=en_US.UTF-8\nLANGUAGE=en_US.UTF-8" > /etc/default/locale \ | ||
&& echo 'export LC_ALL=en_US.UTF-8' >> /root/.profile \ | ||
&& echo 'export LANG=en_US.UTF-8' >> /root/.profile \ | ||
&& echo 'export LANGUAGE=en_US.UTF-8' >> /root/.profile | ||
|
||
ENV LC_ALL en_US.UTF-8 | ||
ENV LANG en_US.UTF-8 | ||
ENV LANGUAGE en_US.UTF-8 | ||
|
||
# Basic Linux tools | ||
RUN apt-get -y --no-install-recommends install wget \ | ||
vim \ | ||
curl \ | ||
sudo \ | ||
unzip \ | ||
zip \ | ||
gnupg2 \ | ||
jq \ | ||
netcat-openbsd \ | ||
bsdmainutils \ | ||
libcurl4-gnutls-dev \ | ||
libxml2-utils \ | ||
libjpeg-dev \ | ||
aspell \ | ||
ghostscript \ | ||
inkscape \ | ||
build-essential \ | ||
automake \ | ||
autoconf \ | ||
chrpath \ | ||
libxft-dev \ | ||
libfreetype6 \ | ||
libfreetype6-dev \ | ||
libfontconfig1 \ | ||
libfontconfig1-dev \ | ||
software-properties-common | ||
|
||
# Git 2.0 | ||
RUN add-apt-repository ppa:git-core/ppa \ | ||
Check failure on line 77 in Dockerfile GitHub Actions / hadolint
|
||
&& apt-get update -y --fix-missing \ | ||
&& apt-get -y --no-install-recommends install git \ | ||
&& bash -c 'git --version' | ||
|
||
# SSH Daemon | ||
RUN apt-get -y install ssh \ | ||
Check failure on line 83 in Dockerfile GitHub Actions / hadolint
|
||
&& mkdir /var/run/sshd \ | ||
&& chmod 0755 /var/run/sshd | ||
|
||
# Java | ||
ENV MAVEN_OPTS "-Xmx1g" | ||
ENV JAVA_OPTS "-Xmx1g" | ||
ENV JAVA_HOME "/usr/lib/jvm/java-17" | ||
RUN apt-get -y install ca-certificates openjdk-11-jdk openjdk-17-jdk \ | ||
&& update-java-alternatives --set $(ls /usr/lib/jvm | grep java-1.11) \ | ||
&& ln -s "/usr/lib/jvm/$(ls /usr/lib/jvm | grep java-1.11)" /usr/lib/jvm/java-11 \ | ||
&& ln -s "/usr/lib/jvm/$(ls /usr/lib/jvm | grep java-1.17)" /usr/lib/jvm/java-17 \ | ||
&& echo 'export JAVA_HOME=/usr/lib/jvm/java-11' >> /root/.profile \ | ||
&& bash -c '[[ "$(javac --version)" =~ "11.0" ]]' | ||
|
||
# Maven | ||
ENV MAVEN_VERSION 3.9.6 | ||
ENV M2_HOME "/usr/local/apache-maven/apache-maven-${MAVEN_VERSION}" | ||
RUN echo 'export M2_HOME=/usr/local/apache-maven/apache-maven-${MAVEN_VERSION}' >> /root/.profile \ | ||
&& wget --quiet "https://dlcdn.apache.org/maven/maven-3/${MAVEN_VERSION}/binaries/apache-maven-${MAVEN_VERSION}-bin.tar.gz" \ | ||
&& mkdir -p /usr/local/apache-maven \ | ||
&& mv "apache-maven-${MAVEN_VERSION}-bin.tar.gz" /usr/local/apache-maven \ | ||
&& tar xzvf "/usr/local/apache-maven/apache-maven-${MAVEN_VERSION}-bin.tar.gz" -C /usr/local/apache-maven/ \ | ||
&& update-alternatives --install /usr/bin/mvn mvn "${M2_HOME}/bin/mvn" 1 \ | ||
&& update-alternatives --config mvn \ | ||
&& mvn -version \ | ||
&& bash -c '[[ "$(mvn --version)" =~ "${MAVEN_VERSION}" ]]' | ||
COPY settings.xml /root/.m2/settings.xml | ||
|
||
# NodeJS | ||
RUN rm -rf /usr/lib/node_modules \ | ||
&& curl -sL https://deb.nodesource.com/setup_18.x -o /tmp/nodesource_setup.sh \ | ||
&& bash /tmp/nodesource_setup.sh \ | ||
&& apt-get -y install nodejs \ | ||
&& bash -c 'node --version' \ | ||
&& bash -c 'npm --version' | ||
|
||
# Rust and Cargo. | ||
ENV PATH="${PATH}:${HOME}/.cargo/bin" | ||
RUN curl https://sh.rustup.rs -sSf | bash -s -- -y \ | ||
&& echo 'export PATH=${PATH}:${HOME}/.cargo/bin' >> /root/.profile \ | ||
&& ${HOME}/.cargo/bin/rustup toolchain install stable \ | ||
&& bash -c '"${HOME}/.cargo/bin/cargo" --version' | ||
|
||
# Clean up | ||
RUN rm -rf /tmp/* \ | ||
/root/.ssh \ | ||
/root/.cache \ | ||
/root/.wget-hsts \ | ||
/root/.gnupg | ||
|
||
ENTRYPOINT ["/bin/bash", "--login", "-c"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
The MIT License (MIT) | ||
|
||
Copyright (c) 2024 Aliaksei Bialiauski | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included | ||
in all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"$schema": "https://docs.renovatebot.com/renovate-schema.json", | ||
"extends": [ | ||
"config:base" | ||
] | ||
} |