Created
November 29, 2022 11:00
-
-
Save samsalisbury/34445cd6c8af2016cfd2a5126ef0aa19 to your computer and use it in GitHub Desktop.
docker-compose
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
FROM centos:7 | |
RUN curl -o /etc/yum.repos.d/hashicorp repo http://rpm.releases.hashicorp.com/RHEL/hashicorp.repo | |
RUN mkdir /var/linux-build-info/ | |
RUN touch /var/linux-build-info/newfile.txt | |
COPY do-stuff / | |
CMD /do-stuff |
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
#!/usr/bin/env bash | |
set -Eeuo pipefail | |
FILE=/var/linux-build-info/newfile.txt | |
echo "SOME TEXT HERE" >> "$FILE" | |
echo "==> File contents:" | |
cat "$FILE" |
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
services: | |
centos: | |
build: | |
context: . | |
dockerfile: centos-docker | |
volumes: | |
- linux-build-info:/var/linux-build-info/ | |
volumes: | |
linux-build-info: | |
driver: local |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment