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
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Tools
Docker
Ansible
Commits
9ee5ea79
Commit
9ee5ea79
authored
3 years ago
by
Dmitriy Safronov
Browse files
Options
Downloads
Plain Diff
Merge branch 'fix' into 'master'
Fix See merge request docker/ansible!27
parents
e8c3398d
aa4cd5fa
No related branches found
No related tags found
1 merge request
!27
Fix
Pipeline
#2699
passed
3 years ago
Stage: lint
Stage: pack
Stage: test
Stage: release
Changes
1
Pipelines
5
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
Dockerfile
+7
-5
7 additions, 5 deletions
Dockerfile
with
7 additions
and
5 deletions
Dockerfile
+
7
−
5
View file @
9ee5ea79
FROM
registry.cyberbrain.pw/docker/alpine:latest
AS
builder
ARG
ANSIBLE_VERSION
ARG
ANSIBLE_BUILD_DEPENDENCIES
ARG
ANSIBLE_PACKAGES
ENV
PATH="/opt/ansible/bin:$PATH"
RUN
apk
--no-cache
add python3
&&
\
apk
--no-cache
add
--virtual
build-dependencies
musl-dev python3-dev libffi-dev openssl-dev yaml-dev cargo
&&
\
apk
--no-cache
add
--virtual
build-dependencies
${
ANSIBLE_BUILD_DEPENDENCIES
}
&&
\
python3
-m
venv /opt/ansible
&&
\
pip3
install
--ignore-installed
--no-cache-dir
--upgrade
pip setuptools wheel
&&
\
export
ANSIBLE_PACKAGES
=
"pyyaml ansible-lint mitogen jmespath pywinrm patch hvac"
&&
\
(
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
}
)
&&
\
pip3
install
--ignore-installed
--no-cache-dir
ansible
${
ANSIBLE_PACKAGES
}
&&
\
#apk del build-dependencies &&
\
rm
-rf
/var/cache/apk/
*
FROM
registry.cyberbrain.pw/docker/alpine:latest
AS
runtime
ARG
ANSIBLE_RUNTIME_DEPENDENCIES
ENV
PATH="/opt/ansible/bin:$PATH"
WORKDIR
/srv/ansible
RUN
apk
--no-cache
add python3 yaml openssl ca-certificates sshpass openssh-client rsync git
&&
\
RUN
apk
--no-cache
add python3
&&
\
apk
--no-cache
add
${
ANSIBLE_RUNTIME_DEPENDENCIES
}
&&
\
rm
-rf
/var/cache/apk/
*
COPY
--from=builder /opt/ansible /opt/ansible
CMD
[ "ansible", "--version" ]
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment