forked from corticometrics/fs-docker
-
Notifications
You must be signed in to change notification settings - Fork 2
/
buildspec-minify-test.yml
28 lines (26 loc) · 1.02 KB
/
buildspec-minify-test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# see https://docs.aws.amazon.com/codebuild/latest/userguide/build-spec-ref.html
version: 0.2
env:
shell: bash
# https://stackoverflow.com/questions/58216549/how-to-retrieve-secret-manager-data-in-buildspec-yaml
parameter-store:
DOCKERHUB_PASS_PARAM: /dockerhub-access-token-for-pwighton
phases:
install:
on-failure: ABORT
commands:
- export DOCKERHUB_PASS=$DOCKERHUB_PASS_PARAM
- docker login --username pwighton --password $DOCKERHUB_PASS
- pip install neurodocker docker
build:
on-failure: ABORT
commands:
- docker pull pwighton/fs-infant-dev
post_build:
on-failure: ABORT
commands:
- docker run --security-opt seccomp:unconfined --rm -it -d --name container-to-min --entrypoint /bin/bash pwighton/fs-infant-dev
- sleep 1
- cmd1="echo hello world"
- yes | neurodocker-minify --container container-to-min --dirs-to-prune /opt --commands "$cmd1"
- docker export container-to-min | docker import - pwighton/container-to-min--test