version: 0.2 env: parameter-store: DOCKER_PASSWORD: "DOCKER_PASSWORD" phases: pre_build: commands: - docker login -u epequeno -p $DOCKER_PASSWORD build: commands: - chmod -R ugo+w $CODEBUILD_SRC_DIR - docker run --rm -v "$(pwd)":/home/rust/src ekidd/rust-musl-builder cargo build --release - docker build -t rusty . - docker tag rusty epequeno/rusty post_build: commands: - docker push epequeno/rusty - echo '[{"name":"rusty","imageUri":"epequeno/rusty:latest"}]' > $CODEBUILD_SRC_DIR/imagedefinitions.json artifacts: files: - imagedefinitions.json