Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Ansible
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Container registry
Monitor
Service Desk
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Tools
Docker
Ansible
Merge requests
!24
Fix
Code
Review changes
Check out branch
Download
Patches
Plain diff
Expand sidebar
Merged
Fix
fix
into
master
Overview
0
Commits
16
Pipelines
1
Changes
1
Merged
Fix
Dmitriy Safronov
requested to merge
fix
into
master
Jun 26, 2021
Overview
0
Commits
16
Pipelines
1
Changes
1
0
0
Merge request reports
Viewing commit
51b7243f
Prev
Next
Show latest version
1 file
+
5
−
32
Side-by-side
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
51b7243f
Dockerfile
· 51b7243f
Dmitriy Safronov
authored
Jun 26, 2021
Dockerfile
+
5
−
32
View file @ 51b7243f
Edit in single-file editor
Open in Web IDE
Show full file
@@ -2,45 +2,18 @@ FROM registry.cyberbrain.pw/docker/alpine:latest AS builder
@@ -2,45 +2,18 @@ FROM registry.cyberbrain.pw/docker/alpine:latest AS builder
ARG
ANSIBLE_VERSION
ARG
ANSIBLE_VERSION
ENV
PATH="/opt/ansible/bin:$PATH"
ENV
PATH="/opt/ansible/bin:$PATH"
RUN
apk
--no-cache
add python3
&&
\
RUN
apk
--no-cache
add python3
&&
\
apk
--no-cache
add
--virtual
build-dependencies
\
apk
--no-cache
add
--virtual
build-dependencies musl-dev python3-dev libffi-dev openssl-dev cargo
&&
\
musl-dev
\
python3-dev
\
libffi-dev
\
openssl-dev
\
cargo
\
&&
\
python3
-m
venv /opt/ansible
&&
\
python3
-m
venv /opt/ansible
&&
\
pip3
install
--ignore-installed
--no-cache-dir
--upgrade
\
pip3
install
--ignore-installed
--no-cache-dir
--upgrade
pip setuptools wheel
&&
\
pip
\
export
ANSIBLE_PACKAGES
=
"pyyaml ansible-lint mitogen jmespath pywinrm patch"
&&
\
setuptools
\
(
test
-z
$ANSIBLE_VERSION
&&
pip
install
--ignore-installed
--no-cache-dir
ansible
${
ANSIBLE_PACKAGES
}
||
pip
install
--ignore-installed
--no-cache-dir
ansible
\<
=
$ANSIBLE_VERSION
${
ANSIBLE_PACKAGES
}
)
&&
\
wheel
\
&&
\
(
test
-z
$ANSIBLE_VERSION
&&
\
pip
install
--ignore-installed
--no-cache-dir
pyyaml ansible
||
\
pip
install
--ignore-installed
--no-cache-dir
pyyaml ansible
\<
=
$ANSIBLE_VERSION
\
)
&&
\
pip3
install
--ignore-installed
--no-cache-dir
\
ansible-lint
\
mitogen
\
jmespath
\
pywinrm
\
patch
\
&&
\
#apk del build-dependencies &&
\
#apk del build-dependencies &&
\
rm
-rf
/var/cache/apk/
*
rm
-rf
/var/cache/apk/
*
FROM
registry.cyberbrain.pw/docker/alpine:latest
AS
runtime
FROM
registry.cyberbrain.pw/docker/alpine:latest
AS
runtime
ENV
PATH="/opt/ansible/bin:$PATH"
ENV
PATH="/opt/ansible/bin:$PATH"
WORKDIR
/srv/ansible
WORKDIR
/srv/ansible
RUN
apk
--no-cache
add
\
RUN
apk
--no-cache
add python3 openssl ca-certificates sshpass openssh-client rsync git
&&
\
python3
\
openssl
\
ca-certificates
\
sshpass
\
openssh-client
\
rsync
\
git
\
&&
\
rm
-rf
/var/cache/apk/
*
rm
-rf
/var/cache/apk/
*
COPY
--from=builder /opt/ansible /opt/ansible
COPY
--from=builder /opt/ansible /opt/ansible
CMD
[ "ansible", "--version" ]
CMD
[ "ansible", "--version" ]
Loading